How To Execute two Different Sets of "requiredfieldvalidator"

R

RSB

Hi all,
i have this form with the NewText Fields and then the Editable datagrid for
all the existing Records. So i have to Buttons "Add New" and "Save Changes"
and there is a Set of Validations for "Add New" say Validation1 and
Validation2.
and there is a Set of Validations for "Save Changes" say Validation3 and
Validation4.


Now what happens is when i click on the "Save Changes" for the GridEdit. it
still check the Validation1 and Validation2 .. which is not i want..


So how do i ignore those checks. Or how do i make sure that only those
checks are getting execute which i want.


Thanks

RSB
 
R

Raterus

Two ways, neither of which I think you'll like

a- Wait for asp.net 2.0 and Validation Groups
b- Put all validators for a certain group within a panel, and make this panel visible/invisible. Essentially only showing one grouping of buttons/inputs at a time. Of course if you have an "add new" and "save changes" really only one of these should be displayed at a time anyway.

Hope this helps,
--Michael
 
P

Peter Blum

There is a third way. The "Validation Groups" concept is the right idea. It
happens to be available today in third party products. I wrote
"Professional Validation And More" (http://www.peterblum.com/vam/home.aspx)
to overcome the numerous limitations of the Microsoft validators (for a list
of those limitations, see http://www.peterblum.com/vam/valmain.aspx.) It
includes validation groups. It's easy to convert your page to my validators
because I include a Windows app to handle the conversion.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

Two ways, neither of which I think you'll like

a- Wait for asp.net 2.0 and Validation Groups
b- Put all validators for a certain group within a panel, and make this
panel visible/invisible. Essentially only showing one grouping of
buttons/inputs at a time. Of course if you have an "add new" and "save
changes" really only one of these should be displayed at a time anyway.

Hope this helps,
--Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top