I have a database that uses a tri-state column (integer) that currently uses 0=unknown, 1=yes, -1=no although those codes could change easily. In PHP I wrote a simple drop down that uses images a checkmark for yes, a X for no and blank for unknown. I'd like to use a similar type setup with ultragrid. is this possible? If so I could use some pointers in the right direction as I am just now experimenting with ultragrid.
Peter
You could do this using an UltraCheckEditor as the EditorControl of a grid column; in the 8.2 release, I *think*, there was a new GlyphInfo property that was added to the check editor that allows you to specify custom images for each of the states. You would still likely need to use a DataFilter to convert your values to a nullable boolean type, though, since 0 would be parsed as 'false' and I don't know how it would treat '-1'. There is already an example of a DataFilter for checkboxes in the KB that should help you out in this regard.
-Matt
ok, the UltraCheckEditor is looking like a good start here are my questions:
1. The "indeterminate" state appears to activate on hover...that seems unusual. I'd like to be able to cycle through yes-no-unknown, or checked->unchecked->indeterminate. I dont see how to do this
2. I cant seem to set the editor to the column. When I go to the Grid's properties for that column and select ColumnEditor, it shows (none) and the dropdown is empty.
3. Should I be thinking about a multi-column drop down where the first column is an image and the 2nd column is the text (0,1,-1) and the width of column 2 is 0?