Hello!
I have a WinGrid on my APP that has a Cell with TreeStateCheckbox Style.
Now I need to interpret the checkbox state. How can I do this?
If I had a checkbox with two states only I'll do : (Convert.ToBoolean(e.Cell.Value) == true) to checked and (Convert.ToBoolean(e.Cell.Value) == false) to unchecked. But how can I interpret the third state?
Thank you.
Best regards,
Maria
Hello Maria,
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
I am using the following code in order to determine the state:
if (e.Cell.Value.ToString() != "") { if ((Convert.ToBoolean(e.Cell.Value)).ToString() == bool.TrueString) { Console.WriteLine("It is true now!"); } else if ((Convert.ToBoolean(e.Cell.Value)).ToString() == bool.FalseString) { Console.WriteLine("It is false now!"); } } else Console.WriteLine("It is in the intermediate state now!");
Please try it out and let me know if it suits your needs.