I'm experiencing an issue with the datagrid that I'm not sure should be the expected behavior:
- Have a datagrid bound to a list of object 'MyObject'
- Have a property on MyObject 'MyProperty'
- Assign a validation attribute to MyProperty: [Required(ErrorMessage = "TEST: Required")]
- Run the website. Edit the MyProperty column value and set it to "" (blank).
- It displays the validation error correctly BUT it still writes the blank value to the MyObject.MyProperty object.
Questions:
- Why is it writing back values that fail validation? I would expect the grid UI to display the invalid value, but not have it written to the object.
- Is there any way to tell the datagrid 'Don't write back values if the validation fails"
Thanks!