473,406 Members | 2,259 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,406 software developers and data experts.

Problem with comparison validator in ASP.NET DataGrid

I'm having the following problem with an ASP.NET page (using the .NET
Framework 1.1 and VS.NET 2003):

I have a DataGrid that has several template columns that contain validators
in the EditItemTemplate. The RequiredFieldValidators and
RegularExpressionValidators are working fine, but I have one
CompareValidator that I can't get to work. I have a TextBox in the DataGrid
that can't be greater than another TextBox that is on the same page, but not
in the DataGrid. The problem I'm having is that, although the TextBox I want
to compare to shows up in the drop-down list for the ControlToCompare
property of the CompareValidator, when I run the application and click on
the DataGrid's Edit button, I get the error message, "Unable to find control
id 'txtPercentRemaining' referenced by the 'ControlToCompare' property of
'CompareValidator1'." (txtPercentRemaining is the TextBox that isn't in the
DataGrid)

I will try to make this work by moving the TextBox that is the
"ControlToCompare" for the validator into the DataGrid - it doesn't really
matter where it's located on the page, because I will eventually make it
hidden. I have a feeling that that will work, but was wondering if anyone
else has any ideas on how I can get this to work if I leave the one TextBox
outside of the DataGrid.

Thanks in advance,

Brian Foree
Programmer
Texas Department of State Health Services
Sep 28 '06 #1
0 1091

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

Similar topics

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...
1
by: Stephan Bour | last post by:
Hi, I need to validate a text box in a datagrid nested inside a datalist. All I need is to validate that any text is entered in the textbox. However, a requiredfieldvalidator would not do because...
1
by: Adam Knight | last post by:
Hi all, I have a asp:required field validator in a datagrid footer containing a textbox control. (To add new row) I have an issue in that while the footer is hidden and not required it is cause...
1
by: valeria007 | last post by:
Hello! Is it possible to have a validator in a datagrid's ItemTemplate part of the column and NOT in the EditTemplatePart? I know it works in Edit Mode, but this is a datagrid with a checkbox...
2
by: superkhb | last post by:
In Visual Basic can the Comparison validator be set to compare the control to nore than 1 value and what is the syntax. Eg. I want only "Tom" "Dick" or "Harry" entered in a textbox. TIA
4
by: Alan Silver | last post by:
Hello, If you add (say) two text boxes to a form, then add a validator with some simple rule for one of them, you can observer the following problem:- Type some erroneous value in the text...
0
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
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...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.