I have a nested view in my radgrid so that, when you expand an item you see the details of the item. One of the things in there is a checkbox that changes a status. I have it firing a standard checkbox event method (i.e. chkThisBox_CheckChanged(object sender, EventArgs e)...). It updates the database. I also have it rebinding the radgrid. What I want to do is, after rebinding the radgrid, re-select and re-expand the item that was changed. Here's what I have, which does not work:
I also have a RadGrid1_ItemCommand method that handles several commands, including the ExpandCollapse command. But the line that has FireCommandEvent doesn't fire off the itemcommand method. What am I missing here, and is this possible without client side code?
Thanks!
Eddie
| protected void chkApprehended_CheckChanged(object sender, EventArgs e) |
| { |
| var apprehended = ((CheckBox) sender).Checked; |
| var mwId = RadGrid1.SelectedValue.ToString(); |
| var p = Person.GetWantedPerson(mwId); |
| p.Apprehended = apprehended; |
| p.ApprehendedDate = DateTime.Now; |
| Person.ApprehendPerson(p); |
| var thisRow = RadGrid1.SelectedItems[0]; |
| RadGrid1.Rebind(); |
| thisRow.FireCommandEvent("ExpandCollapse", new EventArgs()); |
| // thisRow.Selected = true; |
| // thisRow.Expanded = true; |
| } |
Thanks!
Eddie