I have a gridview that has some errors using DataErrorInfo. When in edit mode, I use cell_validating to potentially set an edit error. However, I then get 2 error controls (red border) overlapping each other. Is it possible to hide or switch off the data layer errors whilst in edit mode?
3 Answers, 1 is accepted
0
Stefan Nenchev
Telerik team
answered on 09 May 2016, 10:21 AM
Hi Jason,
Setting the ValidatesOnDataErrors property of RadGridView to "InViewMode" should disable the Error message that comes up from the IDataErrorInfo interface and only the validation error related to the CellValidating event. Can you please test setting it and update the thread whether this is the functionality you aim for?
Regards,
Stefan Nenchev
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
I had the grid set up in that manner already. My actual issue was that the custom editor had the ValidateOnDataErrors property set to true (which was the default). Switching this off on construction of the editor hid the data errors as I wanted.
Thanks
0
Stefan Nenchev
Telerik team
answered on 11 May 2016, 09:58 AM
Hello Jason,
Great to hear that you have resolved the validation duplication. I am adding a code snippet on setting the ValidatesOnDataErrors property in CellEditTemplate in case some other member experiences a similar issue: