I want to refresh the Kendo UI grid's contents every 60 seconds with up-to-the-minute data.
EDIT: Here's how the dataSource is being assigned at initial configuration:
parsedData = $.parseJSON(data);
var dataSource = new kendo.data.DataSource({
data: parsedData
});
$("#grid").kendoGrid({
dataSource: dataSource,
. . .
Can the grid's dataSource simply be reassigned in one fell swoop? Or would it be better to remove the items in the dataSource.data individually, or by clearing the array, and then injecting new items or replacing the array in its entirety? Does the implementation of observe pattern in the Kendo dataSource indicate one approach over another?
I haven't embarked on this yet, but in my experience with grids, going way back to the early days of Visual Basic, changing a grid's datasource has always had undesirable side-effects and I have no reason to expect this will be any smoother sailing. Hope I'm wrong.
ANOTHER EDIT# (26 April 2013): if there is an approach to refreshing the grid's underlying data with a new set of rows having the same structure as previously, an approach that would preserve the expanded/collapsed state of the grid's groupings, that would be ideally suited to our purposes.