Hello,
I am using a RadGrid with clientside binding to a WCF service and it is not deselecting previously selected rows as the page changes. I have written script to keep track of selected rows in JavaScript, but when changing pages, it keeps the row selected. For example if I select row 3, and switch to the next page, the new row 3 is still selected.
What is the event that fires after data is bound on the client side. I assume I can write a script to iterate over the grid's data and select and unselect rows.
Here is the code I have so far:
var selected = {};
function RadGrid1_RowSelected(sender, args) {
var ResourceKey = args.getDataKeyValue("resourceKey");
if (!selected[ResourceKey]) {
selected[ResourceKey] = true;
}
updateSelected();
}
function RadGrid1_RowDeselected(sender, args) {
var ResourceKey = args.getDataKeyValue("resourceKey");
if (selected[ResourceKey]) {
selected[ResourceKey] = null;
}
updateSelected();
}
Regards,
Josh
I am using a RadGrid with clientside binding to a WCF service and it is not deselecting previously selected rows as the page changes. I have written script to keep track of selected rows in JavaScript, but when changing pages, it keeps the row selected. For example if I select row 3, and switch to the next page, the new row 3 is still selected.
What is the event that fires after data is bound on the client side. I assume I can write a script to iterate over the grid's data and select and unselect rows.
Here is the code I have so far:
var selected = {};
function RadGrid1_RowSelected(sender, args) {
var ResourceKey = args.getDataKeyValue("resourceKey");
if (!selected[ResourceKey]) {
selected[ResourceKey] = true;
}
updateSelected();
}
function RadGrid1_RowDeselected(sender, args) {
var ResourceKey = args.getDataKeyValue("resourceKey");
if (selected[ResourceKey]) {
selected[ResourceKey] = null;
}
updateSelected();
}
Regards,
Josh