0
votes

I want to rebind a kendo grid in an Angular UI. the schema and data of the datasource will change. I happen to be able to change the data by

$scope.grid.dataSource.data(data); $scope.grid.refresh();

but this does not change the schema.

In the non angular world I would have just called grid.destroy and the recreated the grid. but this kills the grid and all bound events.

$("#grid").removeData('kendoGrid'); $grid.empty();

Any help would be appreciated.

1

1 Answers

0
votes

The solution is to have separate kendo.data.DataSource objects for each schema, then use the grid's setDataSource() method to switch between data sources. API Reference.