Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
Boolean column cells with check, uncheck and not show any
posted

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

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    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.

Children