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

Grid Validation

3 Answers 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 17 Dec 2014, 09:31 PM
I have an MVC page that has many controls on it, including a Telerik MVC grid. Most of my editors are using DataAnnotations for validation (Required, Range, etc.). However, I'm trying to come up with a way to validate whether or not at least one item exists within the grid. Is there a way to do this? Nothing is jumping out at me in the documentation. Any help would be welcome!

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 19 Dec 2014, 01:50 PM
Hi Chad,

This can be done by using a custom validation rule on a hidden input with an explicitly specified tooltip position. I prepared a proof of concept example that you can check here.

Regards,
Alexander Popov
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.

 
0
Chad
Top achievements
Rank 1
answered on 19 Dec 2014, 07:06 PM
Thanks, Alex, I've seen this in the documentation (although your example is easier to understand). However, I already have a validation message box that uses the DataAnnotations of .NET. Does this validator also populate the standard validation message box? Or do I have to have two different display areas for validation?
0
Alexander Popov
Telerik team
answered on 23 Dec 2014, 10:09 AM
Hi Chad,

Since this is a custom validation rule the Validator will automatically render the Tooltip, however you can override the position as shown in the example.

Regards,
Alexander Popov
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
Grid
Asked by
Chad
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Chad
Top achievements
Rank 1
Share this question
or