This is a migrated thread and some comments may be shown as answers.

AngularJS directive wrapping kendo-grid does not receive kendoEvent

2 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 09 Jun 2014, 01:43 PM
I am trying to create displayBasket directive in order to wrap kendoGrid and other functionality. However, gridDataBound function does not receive kendoEvent - it says that e parameter is undefined. How can I fix this?

In HTML:

<display-basket grid-id="bb-grid" actions="bbActions" uids="uids" grid-options="bbOptions" grid-data-source-factory="bbDataSourceFactory" grid-data-source-options="bbDataSourceOptions">
</display-basket>

In JS:

bsktDirModule.directive ( 'displayBasket', function ( CBPmWebAPI, $compile, $http, $parse ) {
    return {
        restrict: 'AE',
        template: '<div kendo-grid id="{{gridId}}" k-options="gridOptions" k-on-data-bound="gridDataBound(kendoEvent)"></div>',
        scope: {
            actions: '=',
            uids: '=',
            gridId: '@',
            gridOptions: '=',
            gridDataSourceFactory: '=',
            gridDataSourceOptions: '='
        },
        ...
        controller: function($scope) {
            ...
            $scope.gridDataBound = function(e) {
                debugger
            }
            ...
        }
    };
});

Thanks,
Ivan

2 Answers, 1 is accepted

Sort by
0
Accepted
Mihai
Telerik team
answered on 11 Jun 2014, 09:05 AM
Hello,

I encountered a different problem, for which I pushed a fix. (the gridDataBound function was not called at all when I defined it in the directive's controller).

It works for me now, please see this plunker: http://plnkr.co/edit/X4RXmKJm8TN5JUqHxHv3?p=preview

Regards,
Mihai
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ivan
Top achievements
Rank 1
answered on 13 Jun 2014, 04:24 PM
Thank you Mihai!

Your angular-kendo fix completely solved the problem.

Best regards,
Ivan
Tags
Grid
Asked by
Ivan
Top achievements
Rank 1
Answers by
Mihai
Telerik team
Ivan
Top achievements
Rank 1
Share this question
or