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 620 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:22 AM

Hi, i try to use grid in angularjs application.

I defined angular controller like this:

function _controller($scope, gridData) {
        var vm = this;
    ... some code ...
        
        var dataSource = new kendo.data.DataSource({
            data: gridData,
            pageSize: 20,
        });

        vm.onChange = function (data, dataItem, columns) {
            console.log(data);
            console.log(dataItem);
            console.log(columns);
        }

        dataSource.read();
                
        vm.gridOptions = {
            columns: gridColumns,
            selectable: "row",
            editable: false,
            pageable: true,
            dataSource: dataSource
        };

        // private functions
        function _handleChange(e) {
            console.log(e);
        };
    }

1 Answer, 1 is accepted

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

I tried different approaches to replicate the issue, but to no avail. Could you please take a look at the following dojo example that works correctly:
Please ensure that your event handler is defined in the scope and that you reference it correctly within k-on-change.

Hope this helps.


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