This is a migrated thread and some comments may be shown as answers.

Validation- tab out of invalid cells, keeping invalid value

3 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jen
Top achievements
Rank 1
jen asked on 24 Jul 2014, 08:15 PM
Is there a way to show the validation errors in the grid, with the red borders and messages, while still allowing the user to tab into and out of invalid cells?

I have two columns, Min and Max, and a validation rule that says min must be less than max. If this error is applied, and the user wants to edit both values, they may sometimes want to edit one value in such a way that it still breaks the validation rule, but they want to move onto the second value to finish fixing the issue.

Currrently the grid is stopping them from tabbing out until the validation error is gone. This also gets in the way if the validation is NOT occurring on property changed, ( for example if the validations are only occurring on saving).

How do I still show the error without preventing them from leaving the cell, and still keep the modified and invalid data?

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 Jul 2014, 02:37 PM
Hello,

I can suggest you to set the validation for the GridView in ViewMode only:

<telerik:RadGridView ValidatesOnDataErrors="InViewMode"... />

That way you will be able to edit other cells even if there are cells with invalid data. The validation red color and the message will also stay.

Let me know how this works for you.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Noora
Top achievements
Rank 1
answered on 18 Mar 2015, 08:51 AM
it is not working all the values of enum behaves same
0
Dimitrina
Telerik team
answered on 18 Mar 2015, 02:24 PM
Hi,

I am sorry to hear configuring the ValidatesOnDataErrors property does not help. Would it be possible for you to isolate the exact case in a demo project illustrating it and send it to us via a new support thread? You can also take a look at this blog post for a reference on how to isolate an issue. 

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
jen
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Noora
Top achievements
Rank 1
Share this question
or