I have a column in the grid whose style is set to checkbox. Currently it does not matter if the user clicks on the checkbox or anywhere in the cell, the state of the checkbox is toggled. I want the state to toggle only when the user clicks inside the box, otherwise simple select the cell / row.
Hi,
I'm having this exact problem with a checkbox in a grid. I tried playing around with the option suggested on this post but what I find is that no matter where in the cell the user clicks (on the checkbox or outside), the UIElement type is an "Infragistics.Win.UltraWinGrid.UltraGridColumn" so I'm seemingly not able to distinguish between the empty space and the checkbox in the cell.
Thanks,hamanta
This is what I have been using:
{
UIElement element = this.DisplayLayout.UIElement.ElementFromPoint(e.Location);
UltraGridCell cell = element.GetContext(typeof(UltraGridCell)) as UltraGridCell;
cell.Value = !((bool) (cell.Value));
}