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

Validator - Validate grid has more than 1 row

2 Answers 96 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Eric Garza
Top achievements
Rank 1
Eric Garza asked on 15 Mar 2021, 04:53 PM

http://jsfiddle.net/qgw2mtcy/

 

We are trying to validate a grid has more than 1 row before the form submission is valid.  For some reason the validation logic does not trigger the custom rule for the grid row count validation.

2 Answers, 1 is accepted

Sort by
0
Eric Garza
Top achievements
Rank 1
answered on 15 Mar 2021, 04:59 PM

Made a slight change to the logic:

http://jsfiddle.net/6kguq53x/3/

0
Eric Garza
Top achievements
Rank 1
answered on 16 Mar 2021, 09:23 AM
oh my, changed to return grid.dataSource.total() > 0; and it worked.  Complete oversight on my behalf.  Its working! 
Tags
Validation
Asked by
Eric Garza
Top achievements
Rank 1
Answers by
Eric Garza
Top achievements
Rank 1
Share this question
or