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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Basem AlshabaniRank #3,323 · 432 reputationPosted Aug 3, 2021, 1:27 AM EDT
*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
Sachin SinghRank #66 · 26.2K reputationPosted Aug 3, 2021, 4:11 AM EDT