I have a datasource/grid that I would like to update depending on selected in a TreeView.
I have my datasource created like so:
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/api/items",
dataType: "json",
data: { id: "1" }
}
}
});
When a user selected an item on the TreeView I want to update the datasource to change the id that defines its results. Can I just create a new dataSource with the new {data: {id: "newid"}}?
How would I then apply this to the grid that already exists?
I have my datasource created like so:
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/api/items",
dataType: "json",
data: { id: "1" }
}
}
});
When a user selected an item on the TreeView I want to update the datasource to change the id that defines its results. Can I just create a new dataSource with the new {data: {id: "newid"}}?
How would I then apply this to the grid that already exists?