Skip to content

Kendo UI

Kendo UI – Uncaught TypeError: dataSource.read is not a function

When using a kendo data source and receiving the error message “Uncaught TypeError: dataSource.read is not a function” or “Uncaught TypeError: dataSource.data is not a function” then that means you likely assigned the datasource like such:

Problem


var gridOptions = {
    data: data,
    schema: {

    }
}

The problem is that you are not creating a kendo datasource object. To do so, use the following code:

Solution

var gridOptions = new kendo.data.dataSource({
    data: data,
    schema: {

    }
});
Twitter Auto Publish Powered By : XYZScripts.com