Organizational Research By

Surprising Reserch Topic

enable disable asp net validator controls within a specific validationgroup wi


enable disable asp net validator controls within a specific validationgroup wi  using -'asp.net,javascript,jquery,validation'

I know how to enable/disable individual validator controls on the client side using

ValidatorEnable(validator, false);


But how do you enable/disable all the validators within a ValidationGroup?
    

asked Oct 7, 2015 by mca.agarwal
0 votes
7 views



Related Hot Questions

3 Answers

0 votes

The validator properties aren't rendered as attributes unfortunately, so I don't know a good way to select them directly. You can try to iterate the Page_Validators array and filter out the ones you want to work with.

Try:

$.each(Page_Validators, function (index, validator){
   if (validator.validationGroup == "your group here"){

      ValidatorEnable(validator, false);

   }
});
answered Oct 7, 2015 by nimisha.jagtap
0 votes

Check this blogpost explaining how with javascript. The main part of the code from the blog:


answered Oct 7, 2015 by 20shahi
0 votes

Alternatively you can simply have ValidationGroup attribute with each validator defined .

Then you wont need any Jquery or javascript stuff to close them.

Here is the link that worked for me.

http://www.w3schools.com/aspnet/showasp.asp?filename=demo_prop_webcontrol_imagebutton_validationgroup

answered Oct 7, 2015 by gauravg.gwl

...