Hi All,
I have a wingrid where one of the column has Check Box Style. But we need a tri-state Check Box here and it should serve something like this.
0-UnChecked
1- Checked
2- Checked But With Gray BackGround (Or Something Striking Not Similar With Checked so that the user can identify the state nstead of Indeterminate state which has the blue color filled in the check box)
Can this be done by implementing Infragistics.Win.IEditorDataFilter?
Thanks in Advance.
Hi,
What is the DataType of the column?
What kind of DataSource are you using?
The third state you are referring to is usually called the Indeterminate state.
If the 0, 1, and 2 you have here are integer values and you have to use those, then I beleive you would need a DataFilter to translate 0, 1, and 2 into CheckState.False, CheckState.True, CheckState.Indeterminate and vice versa.
But if you are using (or can use) values like true, false, and DBNull, or you can change the DataType of the field to a CheckState, then you can probably achieve what you want by simply setting the Style of the column to TriStateCheckBox.
mike,
data type will be an integer and datasource will be a data set.
I understand third state being indeterminate state. But is there any way to change the appearance of the checkbox in in determinate state. Instead of checkbox filled with color, i want to change the apperance of it.. is this possible?
Thanks!
Swetha said:data type will be an integer and datasource will be a data set.
In that case, you will need a DataFilter to translate the integer value into a CheckState.
Swetha said:I understand third state being indeterminate state. But is there any way to change the appearance of the checkbox in in determinate state. Instead of checkbox filled with color, i want to change the apperance of it.. is this possible?
Yes, this is possible. What you can do is put an UltraCheckEditor control on the form. You will need one for your DataFilter, anyway. You set the grid column's EditorComponent property to the UltraCheckEditor.
You can use the GlyphInfo property on the UltraCheckEditor to change the appearance of any state of the CheckBox.