when the application loads and my property values are not valid the validation works as expected. My cells with invalid data is surrounded with a red line and I get the icon displayed in front of the row with errors. When I edit the cell and correct the data the red outline of the cell goes away it I tab out the cell or hit enter. However the error icon stays unless I hit the enter key or tab through all the cells in the row.
The behavior I am trying to achieve is that when the user leaves(by using the enter key,tab out of the cell or when the cell loses focus) the cells and no other cells contain data the error icon disappears as well.
I am also using the cell validating event on the RadGrid view to validate the cell data and that seems to work except the error indicator stays there.
Thanks,
Alan Frye
9 Answers, 1 is accepted
Could you please send me a sample project that demonstrates the described issue? I believe that we will solve the problem shortly.
You should open a separate support ticket in order to be able to attach files.
Thank you in advance.
Kind regards,
Nedyalko Nikolovthe Telerik team
When a user clicks the new row buttong to add a new row, I have validation checks in place to show errors immediately on fields that are required. But if the user cancels the new row, although the row goes away, the error icon in the row header does not go away, so my "new row" row has an error icon.
I cannot attach photos to show a screenshot of what my row looks like. How do I tell the grid to remove that error icon?
Could you confirm that you can reproduce the described behavior with our latest internal build?
If the issue persists, it will be very helpful to send me at least the code you are using to validate the new row.
Thank you in advance.
Nedyalko Nikolov
the Telerik team
If I set ValidatesOnDataErrors = InEditMode then it doesn't do that, because it only reports validation errors when you in editMode for each cell. I'd like to be able to let the user navigate away from the row, but keep the Validation notifications so they know there is a problem.
I'm extending my EF entities using partial classes and implementing IDataErrorInfo to report validation problems. When I create a new entity, I'm adding validation errors to the entity so that the user immediately sees which fields are required (indicated by the red outlines on the cell).
Do you still need to see the validation code?
Generally if you want to enable such kind of validation (aka "asynchronous validation"), perhaps you need to set ValidatesOnDataErrors = InViewMode, this way the user will be able to see the errors and edit another item.
Indeed a sample project will be the best option in this case, but any information that could bring more light to the problem is welcome.
Nedyalko Nikolov
the Telerik team
Most probably the issue will be fixed, but I cannot be sure without a sample project.
If you send me a sample project (with steps to reproduce the problem), I'll check it against latest version and will notify you accordingly.
Best wishes,
Nedyalko Nikolov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>