I have an asp.net mvc grid which I am automatically refreshing every few minutes. The problem I am running into is that if the user has selected a row, the selection is lost. How can I keep that row selection?
Hi,
I'm trying to do the same with ajax binding and I just cannot seem to make it work. 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 just can't make it work. Btw, I'm using the MVC wrappers at present. What is wrong in 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 + '"]');