Sagar K Sagar K - 3 months ago 42
TypeScript Question

Kendo UI Type Script Issue

I have installed latest type definition file of Kendo UI from package manager console and include the file in type script as :

/// <reference path="../scripts/typings/kendo-ui/kendo-ui.d.ts" />


Also i have tried to install previous versions but getting the same issue :

drillDownDataSource: any = new kendo.data.TreeListDataSource({
transport: {
read: {
url: 'StatutoryIncome/GetStatutoryIncomeStatementView/',
dataType: "json",
type: "POST",
async: true,
cache: true,
autoBind: true, // This property is not accessible
data: function() {},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {
models: kendo.stringify(options.models)
};
}
}
}
},
}
}


As i mentioned in above code autobind property is not accessible, even if i remove the auto-bind property the parameterMap function gives error.
Also the functions of kendoTreelist like content is not accessible

Answer

Based on the KendoUI docs, parameterMap should be nested under transport not under transport.read.

And as far as I'm aware autobind does not exist in the DataSource configuration, this config-element is usually available on the component itself. (See for example the TreeList-Configuration)