Grid fails to initialize with Boolean field and Range validator

I have a class with the following properties, PLEASE focus on the last one, the boolean:


The range attribute here is used to accept values only true or false, not null, act as REQUIRED, as required does not work with booleans.


When running the grid, this is what I get: 


Why is this validation producing such an error? there's nothing wrong with the validation and I have used it several times with editforms with no problem...  

I would like somebody to assist as documentation is very poor, I can't finish my Intel project because I have to deal with very basic bugs... thank you for your help.


2 Replies

GP Guillermo Perez February 21, 2022 02:26 AM UTC

I found the answer.  When using Range validator, the lowes value should be first, in this case it should be FALSE first then TRUE.


[Range(typeof(bool), "false", "true"...]



MS Monisha Saravanan Syncfusion Team February 21, 2022 07:13 AM UTC

Hi Guillermo,  

Thanks for the update.  

We are glad to hear that you have resolved your query on your own.  

Kindly get back to us if you are facing any further issues in future.  

Regards, 
Monisha 


Loader.
Up arrow icon