2014년 12월 29일 월요일

Re: [AngularJS] Angular js with jqxgrid

I have created a grid with jqxgrid and I am fetching the columns from service.

    $scope.gridSettings =
        {
            width: 1000,
            source: dataAdapter,
            filterable: true,
            ready: function () {
                addfilter();
            },
            autoshowfiltericon: true,
            sortable: true,
            pageable: true,
            autoheight: true,
            columnsresize: true,
            pagermode: 'simple',
            pagesize: 3,
            columns: [            
            
            { text: 'User', dataField: 'UpdateUser', width: 200 },
            { text: 'Link', datafield: 'Id', width: 500, cellsrenderer: linkrenderer }
            ]
        };

The linkrenderrer is defined as below:
 var linkrenderer = function (row, column, value) {
            var id = value;
           
         //   alert(id);
           //var html = "<button ng-click='getContentdata()'>get</button>";
            var html = "<img  src='../Images/preview.png'  ng-click='openPreviewPage(\"" + id + "\")'/>&nbsp;&nbsp<img  src='../Images/edit.jpg'  onclick='editPage(\"" + id + "\")'/>&nbsp;&nbsp<img  src='../Images/delete.jpg'  onclick='delePage(\"" + id + "\")'/>&nbsp;&nbsp<img  src='../Images/duplicate.jpg'  onclick='duplicatePage(\"" + id + "\")'/>&nbsp;&nbsp<img  src='../Images/mail.png'  onclick='sendMail(\"" + id + "\")'/> ";
            return html;
        }

but when I try to call openPreviewPage or any other onclick finctions from $scope,the function is not coming.
Kindly suggest how should I proceed with this.




Check out the following website http://www.jqwidgets.com/. The Community tab and then forums  should be able to help you.


댓글 없음:

댓글 쓰기