Hi,
I'm using the MVC wrappers with ajax binding and I cannot find a way to maintain row selection after an automatic timer initiated grid refresh. The timer is working just fine, but the row selection is lost after the refresh. I think it would be very good to get an example from Telerik as I've spent quite a bit of time searching the internet and this must surely be a common requirement.
Can someone please help with the following code?:
var timer = $.timer(function () {
// -- find currently selected row --
var grid = $("#Grid").data("kendoGrid");
var row = grid.select();
var uid = row.data("uid");
// -- refresh grid --
grid.dataSource.read();
// -- reselect row --
var row2 = grid.table.find('tr[data-uid="' + uid + '"]');
row2.addClass('k-state-selected');
});
timer.set({ time: 5000, autostart: true });
Thanks in advance
I'm using the MVC wrappers with ajax binding and I cannot find a way to maintain row selection after an automatic timer initiated grid refresh. The timer is working just fine, but the row selection is lost after the refresh. I think it would be very good to get an example from Telerik as I've spent quite a bit of time searching the internet and this must surely be a common requirement.
Can someone please help with the following code?:
var timer = $.timer(function () {
// -- find currently selected row --
var grid = $("#Grid").data("kendoGrid");
var row = grid.select();
var uid = row.data("uid");
// -- refresh grid --
grid.dataSource.read();
// -- reselect row --
var row2 = grid.table.find('tr[data-uid="' + uid + '"]');
row2.addClass('k-state-selected');
});
timer.set({ time: 5000, autostart: true });
Thanks in advance