Bind Tristate Checkbox

Hello,

I have a model with a nullable bool property. I would like to bind this property to a tri-state CheckBoxAdv, so I set the TriState property to true.

Next step I bind my property to BoolValue property of the CheckBoxAdv.

The problem is that the BoolValue property is false when my model property is null (I think it should be null in indeterminate state).


This is a bug? If not, how can I bind my nullable property to the tristate CheckBoxAdv?

Thank you!

BR, SZL


5 Replies 1 reply marked as answer

GT Gokul Thanudhas Syncfusion Team August 19, 2022 02:37 PM UTC

Hi SZL,


Since BoolValue is not a nullable bool, it will not accept the null value. You can use IntValue to bind with the integer value where 1 represents checked, 0 represents unchecked and -1 represents intermediate.


We will check and update you in two business days regarding binding the bool value to the CheckBoxAdv.


Regards,

Gokul T



BA BagavathiPerumal Apranandham Syncfusion Team August 23, 2022 01:21 PM UTC

Hi SZL,


We have created a sample based on your requirement. Please refer the sample for your reference.



Regards,
Bagavathi Perumal A


Attachment: checkbox_advtrisatte_c3ddb03d.zip

Marked as answer

SZ SZL replied to BagavathiPerumal Apranandham August 23, 2022 01:55 PM UTC

Thank you, Its working well!



BA BagavathiPerumal Apranandham Syncfusion Team August 24, 2022 12:49 PM UTC

Hi SZL,


We hope that your issue is resolved. Please let us know if you need any other assistance. We are happy to assist you.


Regards,
Bagavathi Perumal A




SZ SZL replied to BagavathiPerumal Apranandham August 24, 2022 01:50 PM UTC

Hi, no, thank you very much! 


Loader.
Up arrow icon