473,395 Members | 1,846 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,395 software developers and data experts.

Problem with required field validator.

103 100+
Hi all,

I have two textboxes, txtName and txtDescription.

i added required field validator to both of them.

I have a Gridview in the same page.

In tht gridview, i have a template field called "Delete". when i click on tht delete link. a javascript is generated which says "Do u want to delete this record?". and when i click yes the entire row will be deleted.

The problem is that when i click on the delete in the gridview, required field validator is executed and i cant delete the record. before click on the delete, i have to enter some values in tht two text boxes.

I tried a lot to find the solution.But i cant..

Please help me...
Oct 5 '07 #1
6 2462
nateraaaa
663 Expert 512MB
Are the two textboxes used to search for data that will be displayed in the gridview? I am assuming the required field validators have nothing to do with the delete functionality. If this is the case you should be able to mark the enabled property of the required field validators to false in the beginning of your Delete button click event. Give this a try and let us know if you find any other issues.

Nathan
Oct 5 '07 #2
mathewgk80
103 100+
Hi,

the text boxes are used to add data into gridview when clicking on Add button .

I used requiredfieldvalidator.enabled=false.. but no change
Required field validater is still working...

regards,
Mathew
Oct 5 '07 #3
mynkow
37
Try custom validator or post some code.
Oct 5 '07 #4
nateraaaa
663 Expert 512MB
I played around with the RequiredValidator properties and if you set the following properties to false in your button click event this should work.

RequiredFieldValidator.EnableClientScript = false;
RequiredFieldValidator.Enabled = false;

Give this a try.

Nathan
Oct 5 '07 #5
on grid properti set cause validation false
and when u insert a new record
at that time check
txtName = dgBlockDescription.Rows(dgBlockDescription.Selecte dIndex).Cells(2).Controls(0)
first find the cell value in one variable and after that set
if(textss1.text="")
(
exit sub
)
thatnks & Regard
Rohit
Oct 6 '07 #6
mathewgk80
103 100+
Hi everyone,

i got the solution...

I have to go to Edit Template and select the template field and then put "Causes Validation" to false...

Thank and Regards,
Mathew
Oct 8 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alex M | last post by:
I'm trying to use the jakarta struts client side javascript validators and the validators are working, but they are not showing the popup messages. I have the message keys defined in the...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
4
by: RA | last post by:
Hi How do I disable it if the user pressed a button: asp:imagebutton id="btnHome" onclick="test()" runat="server" What I want to have is that if someone presses this button then the required...
5
by: Do | last post by:
Hi, Has anybody run into problems with Page.IsValid? My errors show up when the fields aren't filled correctly, but my processing continues even if the page is invalid. I leave name and...
2
by: Nazir | last post by:
Hi I'm using a regular expression validator, but if spaces are entered, it bypasses the validation! I'm using ^{5,100}$
2
by: Martin | last post by:
Dear Group It says in MSDN that a field can be associated with more than one validators but can one validator be associated with more than one field? Or do I need a validator for each field? How...
3
by: Kivak Wolf | last post by:
Hi, Could someone give me a quick review of how to use the required field Validator? I'm completely at a loss, and MSDN does not help one bit. =/ Basically all I want done is to make sure that...
0
by: nimeshdotnet | last post by:
Hi All, I have a textbox whose readonly property is set to true. This textbox is also guarded by a required field validator. What i m doing that I have a calendar control whose on date selection i...
1
by: swathichavalla | last post by:
Problem description: Clients working with an apple computer with the safari browser are experiencing problems with brokerage orders. When the client wants to enter a stock order, the order entry...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.