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

Grid k-on-change issue: Uncaught TypeError: i[n].call is not a function

1 Answer 791 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lev
Top achievements
Rank 1
Lev asked on 10 Mar 2016, 08:35 AM
Hi, i was trying to use kendo grid k-on-change directive, but i got some issue.

I have angular controller, like this:
function controller($scope){
var vm = this;
... some code ...

vm.onChange = _onChange;

function _onChange(data, dataItem, columns){
console.log(data);
};
}


and angular config, like this:
function config($stateProvider){
$stateProvider.state('someState.grid',{
url: "some url",
template: "grid.html"
...
controller:"GridController",
controllerAs: 'ctrl',
resolve:{
gridData: function(...)...
},
...
});
}


and grid.html is:
<div class="grid">
    <div kendo-grid
         k-options="ctrl.gridOptions"
         k-ng-delay="ctrl.gridOptions.dataSource"
         k-on-change="ctrl.onChange(data, dataItem, columns)">
    </div>
</div>


So, when i try to select any item in grid, i get: "Uncaught TypeError: i[n].call is not a function" issue.
What is my mistake?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 11 Mar 2016, 07:17 AM
Hi Lev,

Please refer to the answer in the other forum thread that you have opened regarding the same issue:
On a side note, for all sides convenience and for better tracking of the issues, please try to avoid opening duplicate treads in the future. Thank you for your understanding.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Lev
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or