Hi,
Is it possible to set the value of tri-state box to following:
0 - Unchecked
1- Checked
2- Grayed Box
3-Checked
Note: As of this moment, I can only display the Grayed Box when I set the value to DBNull.Value.
Regards,
Njel
Ok. That's what I figured. Thanks!
I don't think there is any easy way to do this. You can try trapping the CellChange event. Inside the event, the Value property of the cell will return the original value (it hasn't been updated, yet). and the Text property will return text indicating the new state that the grid will be setting the value to.
So you could examine the two values and then set the Value again to what you want. I'm not sure how well this would work, though.
Mike, is it possible to change the order that a tri-state checkbox cycles through when clicked?
For example, if I set a checkbox to initially have the Indeterminate state, it goes from Indeterminate -> Unchecked -> Checked -> Indeterminate
I would like to be able to go from Indeterminate -> Checked -> Unchecked -> Indeterminate. Is this possible?
Hi Mike,
Thank you for the information, this really help me a lot.
Thanks for the sample code, this is exactly what I am looking for.
Thanks and regards,