Hello!
I need to know how to allow users to select one row of a RadGrid at a time (client-side), without having everything de-selected with a click. I've done this server-side, so now I'm trying to do this client side. Here is what I have figured out so far:
I first create an Array() object to hold the unique IDs of the rows that are to stay selected:
var uniqueIdArray = new Array();
Next, I have subscribed to the ClientEvents OnRowSelected and OnRowDeselected events with these functions:
// Add the ID to the array of selected rows.
function ThemeSelected(sender, args) {
uniqueIdArray.push(args.getDataKeyValue("IdNo"));
}
// Remove the ID to the array of selected rows.
function ThemeDeselected(sender, args) {
uniqueIdArray.splice(selThemes.indexOf(args.getDataKeyValue("IdNo")), 1);
}
Now what I need is a function that would force the rows that are selected to stay selected. The variable "uniqueIdArray" has the items that are selected. But, if I click on another row (to select it), the first thing that is fired is the "deselection" prior to the selection of the new row.
So, how do I cancel deselects when I don't want them?
Thanks!
-Eric
I need to know how to allow users to select one row of a RadGrid at a time (client-side), without having everything de-selected with a click. I've done this server-side, so now I'm trying to do this client side. Here is what I have figured out so far:
I first create an Array() object to hold the unique IDs of the rows that are to stay selected:
var uniqueIdArray = new Array();
Next, I have subscribed to the ClientEvents OnRowSelected and OnRowDeselected events with these functions:
// Add the ID to the array of selected rows.
function ThemeSelected(sender, args) {
uniqueIdArray.push(args.getDataKeyValue("IdNo"));
}
// Remove the ID to the array of selected rows.
function ThemeDeselected(sender, args) {
uniqueIdArray.splice(selThemes.indexOf(args.getDataKeyValue("IdNo")), 1);
}
Now what I need is a function that would force the rows that are selected to stay selected. The variable "uniqueIdArray" has the items that are selected. But, if I click on another row (to select it), the first thing that is fired is the "deselection" prior to the selection of the new row.
So, how do I cancel deselects when I don't want them?
Thanks!
-Eric