I am using RadGrid ,an d i have given ClientselectColumn for multiselect.
From the server side am using following code
string
script = string.Empty;
script = script +
"selected = new Array();";
foreach (int id in lstselectedIDS)
{
script = script +
"selected.push(\"" + id + "\");";
}
script +=
"SetSelectedRowCount();";
base.AddStartupScript(script);
from the client side am taking the elements in the selected array and making the selection in Rowcreated event like this
function
Grid_RowCreated(sender, args) {
var _Id = args.getDataKeyValue(sender.get_masterTableView().get_name());
if (selected.contains(_Id)) {
args.get_gridDataItem().set_selected(
true);
}
}
Because of this when ever i click on Check box for deselecting it is happening correctly. But if i click again for selecting it it is not happening properly. I need click checkbox 2 times for making a selection.
This is happening only for the selected rows.
If i use server side selection in ItemdataBoud Event, am not getting this problem.
Like
e.Item.Selected=true;
But i need to use the former one
And also am facing this problem in many screens,please help me by giving the solution as soon as possible.
Thanks,
John