Hello,
I have a grid that is bound to a model with nullable types (a bunch of "decimal?" types representing currency, to be exact). It is using a popup for editing. The editor template I am using for the popup hides some of these fields by default and only shows them if certain conditions are met based on other inputs.
At first, I would try to add an item to the grid and it didn't work--the popup wouldn't even close. Then I realized it was because these hidden currency fields were empty, and it was showing a validation message. The properties that are having this issue are not marked as [Required].
I've been trying for hours to find a solution to this problem that makes it so these fields are allowed to be null, or to specify some kind of default value.
If needed I can post a sample project. Any ideas?
I have a grid that is bound to a model with nullable types (a bunch of "decimal?" types representing currency, to be exact). It is using a popup for editing. The editor template I am using for the popup hides some of these fields by default and only shows them if certain conditions are met based on other inputs.
At first, I would try to add an item to the grid and it didn't work--the popup wouldn't even close. Then I realized it was because these hidden currency fields were empty, and it was showing a validation message. The properties that are having this issue are not marked as [Required].
I've been trying for hours to find a solution to this problem that makes it so these fields are allowed to be null, or to specify some kind of default value.
If needed I can post a sample project. Any ideas?