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
3045
How can you set the CheckBoxGlyphInfo and still use custom checkbox in a grid?
posted

I have the grid's CheckBoxGlyphInfo set to Office2007. I want to override the visual of non-editable boolean cell by embedding an UltraCheckEditor with custom glyph during the InitializeLayout event. 

Is this possible? The AppStylist seems to be overriding the embedded checkbox.

  • 469350
    Offline posted

    Hi,

    That's correct, AppSrtylist will override any application-specific settings like this.

    Do you want the different glyphs to apply only to a single column in the grid or all checkboxes in the grid?

    If it's the whole grid, then you could set around this modifying your isl so you have two derived StyleSets. What you would do is remove the CheckBoxGlyphInfo from the Default StyleSet in your isl. Then, you create a new StyleSet and set it to be BasedOn the default and set the CheckBoxGlyphInfo on the derived StyleSet. Then you have to set the StyleSet name your application to the name of the derived StyleSet for any controls you want to show the Office2007 GlyphInfo. You would not set this on the grid, of course, so it would keep using the Default StyleSet and so you would be able to override the Glyphs in code.

    If it's only a single column, then you would either have to take the same approach and then apply a different CheckEditor to the other columns in the grid.

    Or another option would be to use a DrawFilter or a CheckEditor in Custom style instead of using the Glyphs. The latter is a very simple approach to take if you just have a few simple images and don't need to define every individual checkbox state.