I have a variety of checkboxes in a grid where some of them will be bound to underlying objects (boolean) and others that aren't. Those that aren't bound will not retain checkbox check marks, but they still allow them to be checked. When clicking off such a cell, the checkbox will go back to being "unchecked". I want to have control over these unbound checkboxes to make sure they're visibly "unavailable", whether that means preventing any checking activity at all or changing the appearance of the checkbox to a box with a red x or something of the sort just to let users know that the checkbox cannot and should not be used.
I tried hooking into various events such as CellLoaded, etc. but I couldn't find an event that would allow me to check whether or not the checkbox is checked to explicitly make a modification to an individual cell. For example, I tried the following which doesn't work:
I tried hooking into various events such as CellLoaded, etc. but I couldn't find an event that would allow me to check whether or not the checkbox is checked to explicitly make a modification to an individual cell. For example, I tried the following which doesn't work:
void radGridView_CellLoaded(object sender, CellEventArgs e)
{
if (e.Cell.Content is DataFormCheckBoxField)
{
((
DataFormCheckBoxField)e.Cell.Content).IsEnabled = false;
((
DataFormCheckBoxField)e.Cell.Content).IsHitTestVisible = false;
((
DataFormCheckBoxField)e.Cell.Content).IsReadOnly = true;
}
}