I am assigning an UltraCheckEditor to a cell in a WinGrid (via Build_InitializeRow event). The problem is that regardless of how I set the Checked value it displays as a filled in square.
i.e
What am I missing? It works fine when I dynamically create the UltraCheckEditor and add it to a different form, just something about the WinGrid I am assuming.
Thank you for the response and I was able to figure that out just a short bit ago. I had to set the style to Checkbox cell by cell during _InitializeLayout. Then it displayed correctly regardless of mode.
I don't understand what you mean. If the Style of a column or cell is set the CheckBox, then it always shows a CheckBox. It doesn't change when it is in or out of edit mode.
ponyryd said:it displays as a filled in square.
That's the indeterminate state of the CheckBox. This means that the Value of the cell cannot be interpreted by the check editor as true or false. So you need to look at what the Value of your cell is and make sure it's a boolean or maybe a CheckState.
Doing it by row is fine, you just won't be able to use the ColumnStyle. All that the ColumnStyle really does is create an editor for any cells in that column and uses that same editor when any cell in the column goes into edit mode. As long as you are reusing the same editor for each cell, you should be ok; creating multiple identical editors is inefficient since only once cell can be in edit mode at a time anyway.
-Matt