Hi.
My question is - when I data bind grid to data source, boolean data will be interpreted as checkbox, i.e. true will cause the checkbox to be checked , and false will cause the checkbox to be unchecked. The question is - is there a data type which corresponds tri-state check box (i.e. checked, unchecked, disabled) and can control all of its states, or do I need to use boolean field and control disabled state via some other variable and AllowEdit property?
I think that a nullable boolean should work for this ("bool?" or Nullable<bool>). In some cases, the data source will allow DBNull.Value as well, in which case you could use a TriStateCheckBox as the column's Style.
-Matt
Actually, it's even worse. I haven't tried using nullable bool with any value other than null before.
Now i did, and when using nullable bool it displays "False" and "True" as strings, not as checkbox.
Hi, Matt.
That what I was hoping for, but null in bool? results in empty cell (without a checkbox).