I have a grid bound to a list of custom objects. The first column is a GridViewBoolean Column. When a user clicks on the check box I would like the value immediatly reflected back into the underlying data source rather then having to change rows for it to be commited.
Is this possible?
Thanks.
4 Answers, 1 is accepted


Another issue. It only works when I click on the check box itself.
If I click on the surrounding cell, the checkbox changes state, but I am not able to get to the RadCheckBoxEditor because the sending object is actually a GridCheckBoxCellElement.
Any thought?
if (alertGrid.SelectedElement is RadCheckBoxEditor)
{
RadCheckBoxEditor rbe = (RadCheckBoxEditor) alertGrid.SelectedElement;
rbe.SaveValue();
UpdateSelectedDeviceList();
}
else
{
GridCheckBoxCellElement gce = (GridCheckBoxCellElement)
}
Hello johns,
RadCheckBoxEditor is always the first child in the children's hierarchy of GridCheckBoxCellElement. It can be reached trough the Children property. If you process the CellClick event, the cell is accessible through the sender argument of the event:
void radGridView1_CellClick(object sender, GridViewCellEventArgs e)
{
GridCheckBoxCellElement cell = (GridCheckBoxCellElement)sender;
RadCheckBoxEditor editor = (RadCheckBoxEditor)cell.Children[0];
}
Let us know if this helps.
All the best,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
