Hello,
My issue sounds like this:
I am trying to persist the selected rows of a grid throw paging.
I have the following SourceCode:
So..., onDataBinding, I save the selected rows, and, onDataBound, I select the previeous selected rows.
The problem is that when the onDataBound event fires, the page of the grid which contains these Id's is not loaded..., so, the class
Please help.
Later edit
Hmmmm, it seems that the Uid of the grid is not static..., it changes on each databound or databinding...
My issue sounds like this:
I am trying to persist the selected rows of a grid throw paging.
I have the following SourceCode:
dataBinding: function() {
//store the uids of selected rows
$("#requestGrid .k-state-selected").each(function() {
uids.push($(this).data("uid"));
});
},
dataBound: function() {
// selects first grid item
// this.select(this.tbody.find(">tr:first"));
resizeGrid();
if (uids.length != 0) {
for (var i = 0; i < uids.length; i++) {
var currUid = uids[i];
//find and reselect the rows via their uid attribute
this.tbody.find("tr[data-uid='" + currUid + "']").addClass("k-state-selected");
}
}
},
So..., onDataBinding, I save the selected rows, and, onDataBound, I select the previeous selected rows.
The problem is that when the onDataBound event fires, the page of the grid which contains these Id's is not loaded..., so, the class
"k-state-selected"
won't be added.Please help.
Later edit
Hmmmm, it seems that the Uid of the grid is not static..., it changes on each databound or databinding...