How do I force the mvc to render my nullable bool fields with a checkbox? How do I control the views?
When I put type="checkbox" it returns an error (cannot convert type bool? to bool).
Thanks in advance
How do I force the mvc to render my nullable bool fields with a checkbox? How do I control the views?
When I put type="checkbox" it returns an error (cannot convert type bool? to bool).
Thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Aug 3, 2021, 8:11 AM
Basem AlshabaniPosted Aug 3, 2021, 5:27 AM
*Map your nullable field to a non nullable boolean field
*If nullable field is null then boolean field false
*Map check box to the non nullable boolean field