jQuery UI Widgets Forums Plugins AngularJS jqx-grid: ng-click in cellsrenderer

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 9 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqx-grid: ng-click in cellsrenderer #64571

    badera
    Participant

    Dear all

    I would like to use the cellsrenderer function to get customized content in the grid cells and some of the elements should be clickable i.e. bound with ng-click to a scope function:

                
                $scope.myfunction = function() {
                    // do something
                };
                
                var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
                        return '<span ng-click="myfunction()">mylink</span>;
                }
    
                $scope.gridSettings = {
                    source: source,
                    columns: [
                      { text: 'First Name', datafield: 'firstname', width: 100 },
                      { text: 'Last Name', datafield: 'lastname', width: 100, cellsrenderer: cellsrenderer }
                    ]
                };
    

    However, it does not seem to execute the ng-click. Why?
    Thanks in advance for your help!

    jqx-grid: ng-click in cellsrenderer #64580

    Peter Stoev
    Keymaster

    Hi badera,

    cellsrenderer can be used only for displaying HTML in the cells. You can’t use the function to handle clicks, create widgets, etc.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    jqx-grid: ng-click in cellsrenderer #65490

    akshatn
    Participant

    This is not good.
    You should at least provide a gateway from the jqxGrid so the caller can execute a function.

    akshat

    jqx-grid: ng-click in cellsrenderer #65492

    Peter Stoev
    Keymaster

    Hi Akshat,

    cellsrenderer works in the way we designed it. At present, we do not plan any changes about it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.