Ive added a CheckBoxColumn to my grid. The grid is again bound to a collection of data.
The CheckBoxColumn displays the data correctly. If i want to change the data value somewhere by clicking the checkbox, i observe that I have to click 2 times to achieve this. The first click puts the focus rectangle on the cell and the second click modifies the checkbox value.
Is there some option i havnt set when i have this behaviour in the grid ? ( Im pretty sure im missing out on some setting, im just tired of looking for it .. :p, thus asking here ).
Edit : and to be explisit: I want only 1 mouse click in a cell with a checkbox in it to change the checkbox value.
Thanks
Øyvind
The Checkbox column is provided as a convienence to work within our framework. For the behavior you want you would use a TemplateColumn with it's ItemTemplate Property set up to be a checkbox with a two way binding to the underlying property.
<ig:TemplateColumn Key="myBooleanField">
<ig:TemplateColumn.ItemTemplate>
<DataTemplate>
<Checkbox IsChecked="{Binding myBooleanField, Mode=TwoWay}" />
</DataTemplate>
</ig:TemplateColumn.ItemTemplate>
</ig:TemplateColumn >
This column will not raise the editing events.
Do you have a suggestion for how to work around this behaviour ? Its not wanted behaviour seen from a non technical point of view.
Ive tried hooking into the CellClicked event that fires as focus is set, but from there i havnt found a good way of setting the cells value.
This is expected behavior. The first click will put the cell into edit mode, the second will toggle the value of the checkbox.
We do this so that the checkbox can participate in our editing framework in a manner similar to how our other cells support editing.
The Microsoft grid follows the same behavior.