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

2 posts, 0 answers
  1. Lev
    Lev avatar
    2 posts
    Member since:
    Feb 2016

    Posted 10 Mar 2016 Link to this post

    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?
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 11 Mar 2016 Link to this post

    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!
     
Back to Top