This is for version 9.1 Windows Forms. I have the following structure in my UltraDataSource that contains 3 sibling children bands. Also, the first column in all bands contains a checkbox (including headers):
HEADER 0
Row 0 (Band 0)
Row 1 (Band 0)
Header 1
Row 0 (Band 1)
Row 1 (Band 1)
Header 2
Row 0 (Band 2)
Row 1 (Band 2)
Header 3
Row 0 (Band 3)
Row 1 (Band 3)
I have 2 questions
:
1) How do I have the checkbox show a square in it instead of a dull checkbox for CheckState Indeterminate?
2) How do I get the checkbox in Row 1 (Band 0) to show the correct CheckState based on the collective settings of Header 1, Header 2, and Header 3?
+ row2 (band 0)
Thank you Mike. Your answer to the second question is what I was looking for. As for the first question, let me clarify.
When I run the V9.1 Checkbox in Header example in the Sample Explorer application, all checkboxes either contain a checkmark for true, is empty for false, and a square within the checkbox area for indeterminent. That is in both the header and detail rows.
When I implemented the same capability in my application running on the same machine (I'm developing with VS2008 SP1), a checkmark was for true, no checkmark was for false, and a checkbox with the background area of the box area grayed and checked was for indeterminent. What I'm looking for is the same visual representation in the header checkbox as demostrated in the Sampe Explorer, but I want to limit the detail checkboxes to only display true or false values ---- no indeterminent.
Hope you can help and that this clarifies what I'm looking for.
ClaySeifert said:1) How do I have the checkbox show a square in it instead of a dull checkbox for CheckState Indeterminate?
I'm not sure what you mean by "a square" or "a dull checkbox". The CheckBox will appear differently based on the OS. But if you want to control the appearance of the CheckBox, you can use the GlyphInfo. For the grid, this means either setting the GlyphInfo on the UIElementDrawParams.CheckBoxGlyphInfo (which will affect all Infragistics controls in your application) or using an UltraCheckEditor for the grid column and using the GlyphInfo ont he UltraCheckEditor.
ClaySeifert said:2) How do I get the checkbox in Row 1 (Band 0) to show the correct CheckState based on the collective settings of Header 1, Header 2, and Header 3?
There's no automatic way to do this, you would have to code it yourself. I'd use the InitializeRow event, and/or the CellChange event of the grid to track changes in the checkboxes. If you use CellChange, be sure to check the Text property of the cell - you can't use Value, because Value will not be updated when the CellChange event fires.