I have a Grid with the following DataSource:
..
transport: {
read: {
url: "GetJsonData.p",
data: {
"function": grid_function,
"element": "grid",
"param1": grid_param1,
"param2": grid_param2,
"param3": grid_param3,
"rowid": grid_rowid
},
dataType: "json"
}
},
schema: {
data: "data",
total: "recordsCount",
model: {
id: "field1"
}
}
...
I want to be able to update the DataSource when the user selects a row on a different Grid. For that reason, I am using a JS function that uses the SetDataSouce method and passes different values to the getJsonData.p procedure, which then generates the return data:
function SetGridDS(grid_element,grid_function,grid_param1,grid_param2,grid_param3,grid_rowid) {
grid_element.setDataSource(new kendo.data.DataSource({
transport: {
read: {
url: "GetJsonData.p",
data: {
"function": grid_function,
"element": "grid",
"param1": grid_param1,
"param1": grid_param2,
"param3": grid_param3,
"rowid": grid_rowid
},
dataType: "json"
}
},
schema: {
data: "data",
total: "recordsCount",
model: {
id: "field1"
}
}
}));
grid_element.dataSource.read();
}
However, I am getting the e.slice is not a function error. (hence the schema and the model, as suggested by others in the forum - but with no luck).
Is there a way to better analyse the error and find what exactly is causing it?
Thank you in advance,
Syian