|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
controlToValidate property of compareValidatorIf i have a datagrid and have a textbox in 1 editItemTemplate column, and
the compareValidator & another textbox in a different editItemTemplate, when the grid is in edit mode, how do i set the controlToValidate property to the textbox in the different column so that i can validate against it's data input? doing it like i would if they were in the same column, i get exception says: Unable to find control id 'txtHardDate' referenced by the 'ControlToCompare' property of 'cvSoftLockHardDate' What is the workaround? thanks Hi TS,
Welcome to ASPNET newsgroup. As for the Validation control for mutiple DataGrid Column problem, we did have this problem due to the asp.net validators validation scope limitation. They can only validate those control in the same container so that when apply to datagrid, multiple columns are different containers for inner controls that prevent the vaidator controls from working correctly.... So far for such scenario, I think DataList/Repeater or other single Template based databound control will be the suitable one ... Also, if you do need to do serverside validation, you can create a own serverside control which will locate control in the container cell and other neighbour cell and compare their values.... Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "TS" <manofsteele1@nospam.nospam> microsoft.public.dotnet.framework.aspnet.webcontrols:32149| Subject: controlToValidate property of compareValidator | Date: Fri, 30 Dec 2005 17:03:24 -0600 | Lines: 16 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 | X-RFC2646: Format=Flowed; Original | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 | Message-ID: <uibgkUZDGHA.***@TK2MSFTNGP11.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | If i have a datagrid and have a textbox in 1 editItemTemplate column, and | the compareValidator & another textbox in a different editItemTemplate, when | the grid is in edit mode, how do i set the controlToValidate property to the | textbox in the different column so that i can validate against it's data | input? | | doing it like i would if they were in the same column, i get exception says: | | Unable to find control id 'txtHardDate' referenced by the 'ControlToCompare' | property of 'cvSoftLockHardDate' | | What is the workaround? | | thanks | | |
programmatically copy table to another application
grid postback Code to select item in dropdown populated using TableAdapter Referencing controls inside Wizard control newbie to creating web controls Custom Treenodes in Treeview Closing window/page Would like to get two items from a dropdownlist Problem in Setting SelectedValue for DropdownList in Form Adding a Directive to a dynamically created Template Column on gri |
|||||||||||||||||||||||