473,388 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Validator fires on all DataGrids

I have multiple datagrids on a page and each has a
RequiredFieldValidator in the EditItemTemplate as well as on a text
box in the FooterTemplate. The problem is, when the user hits update
in the EditTemplate or Submit on the footer, it fires all the other
validators in the other grids. Anyone have any hints on how to solve
this? And, yes, all grids have to be on one page.
Nov 17 '05 #1
3 934
This same thing came up for someone else a while ago. I don't know if my
suggestion worked out for him or not. Each required field validator has an
enabled attribute. I checked and even if the required field validator's
enabled attribute is set to "False" it still appears in the code of the
rendered page.

Using a javascript onfocus event you should be able to enable the required
field validator(s) for the datagrid being edited and set all others to
"False".

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Reyna Michlig" <za****@yahoo.com> wrote in message
news:fa*************************@posting.google.co m...
I have multiple datagrids on a page and each has a
RequiredFieldValidator in the EditItemTemplate as well as on a text
box in the FooterTemplate. The problem is, when the user hits update
in the EditTemplate or Submit on the footer, it fires all the other
validators in the other grids. Anyone have any hints on how to solve
this? And, yes, all grids have to be on one page.

Nov 17 '05 #2


Thanks so much for the quick response! Unfortunately, I'm very
Java-illiterate. Would you be able to post some code regarding this??
I'd appreciate it SO much!!! Thanks again!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
Reyna,

Now that I think about it are you using an edit button for the rows of each
grid?

If you are, you could probably get away without using javascript. In the
edit button's click event you could simple set the validators to enabled or
disabled right in the codebehind.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Reyna Michlig" <za****@yahoo.com> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...


Thanks so much for the quick response! Unfortunately, I'm very
Java-illiterate. Would you be able to post some code regarding this??
I'd appreciate it SO much!!! Thanks again!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Moore | last post by:
We have a min and max qty fields, but we can't seem to get these to work properly. THe min qty is one of requied fields. A user can enter a min of 1 and max could be 0. We would like to...
0
by: Dave Bailey via DotNetMonster.com | last post by:
I am using a compare validator on a web page. I am using the following code in conjunction with the validator: private void CheckRom() { int to = Convert.ToInt32(romToText.Text, 10); int from...
5
by: Richard Payne | last post by:
Hi This is probably a newbie question but I can't seem to find a clear answer to the problem I have. I have created a Custom Validator control on my webform that works fine, but when I put...
9
by: Alex Shirley | last post by:
Hi there I’m simply trying to check for a blank or empty value in a textbox on my webform. In this instance I do not want to use a requiredfieldvalidator, I want to use a customvalidator (as I...
8
by: News | last post by:
Hi, I have a page with one <form></form>. This page contains 2 part forms with 2 buttons, one for each part form. <form> Part 1 <date>
3
by: Sandy | last post by:
Hi All! I have a password textbox and a verify password textbox. I threw in the compare validator to make sure both values agree. I noticed, however, that immediately the compare validator...
3
by: tshad | last post by:
Can you use a Required Validator on a CheckBoxList? You can on a RadioButtonList. But when I try on my CheckBoxList I get the error: Control 'RFPServiceTypes' referenced by the...
0
by: MA | last post by:
Hi, I'm strugling with tho following case: I use a datalist in my asp.net application to present an interface to the use where he/she can modify some database tables. In de "update mode" I...
1
by: MattB | last post by:
I have a page with dual controls for a person to enter their height and weight. The dual controls are for English and metric units, and Javascript onChange events handle populating the other...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.