I want to be able to restore the selected row in a grid after performing a saveChanges() call.
I was able to get this working when there are no locked columns by using the following definitions in my gridOptions object:
...
dataBound: function (e) {
if (selectedUids.length != 0) {
for (var i = 0; i < selectedUids.length; i++) {
var curr_uid = selectedUids[i];
//find and reselect the rows via their uid attribute
this.tbody.find("tr[data-uid='" + curr_uid + "']").addClass("k-state-selected");
}
}
},
dataBinding: function (e) {
selectedUids = [];
$("#ddhintgrid .k-state-selected").each(function () {
selectedUids.push($(this).data("uid"));
});
},
...
However, when trying this with locked columns I only get the row selection back in the unlocked section. See attached files for example.
When I try debugging I notice that with locked columns I get the same UID inserted into selectedUids twice.
The end goal here is that I want the entire row including the locked section to be re-selected after a grid.saveChanges() operation.