Hi,
I need to display Boolean datagrid column cell as below.
if ( valid == true) - checkbox with checked
if(valid == false) - checkbox with uncheck and different back color
if(valid == null) - donot display any (no check box).
Thanks
What part of this is giving you trouble? Simpy binding the grid to a data source with a boolean field will display checked, unchecked, or indeterminate for true, false, and null.
If you are asking how to change the appearance of the checkboxes, then you have to use images. The checkbox glyphs are drawn by windows and they do not allow you to change just one part or one color. So you would have to replace the entire glyph with an image.
How you do this depends on whether you you want to do this for the entire application or just for individual grid columns.
For individual columns, you could use an UltraCheckEditor and use the GlyphInfo property. Then you set the grid column's EditorControl (or EditorComponent) to the UltraCheckEditor control.
To affect your entire application, you would use the static UIElementDrawParams.CheckBoxGlyphInfo property.
Hi Mike
I did what you suggest by seting EditorControl = ultraCheckEditor1 but I still not able to change the status of the checkbox (checked/unchecked) from the application. Is there any missing?
Jos
Hi Jos,
I'm not sure I understand what you are asking. Is this related to the rest of this thread? Nothing in this thread is talking about being unable to change the state of the checkbox.
If that's happening, then either the column in the grid does not allow editing, or the field in the data source does not.