Groups | Blog | Home
all groups > visual studio .net general > august 2003 >

visual studio .net general : Datagrid Validation - Template 'Control to Validate'?


Alan Z. Scharf
8/29/2003 11:22:59 AM
1. I want to use Validation Controls on Datagrid Item Template TextBoxes.

2. What is the syntax to specify the template textbox "Control to Validate"
in the Validation Control's property list?

3. Does this have to be done programatically?

Thanks.

Alan


--

___________________________
Alan Z. Scharf
GrapeVine Systems
New York City

Alan Z. Scharf
8/29/2003 12:13:18 PM


Never mind.

I figured it out - validation control has to be placed in edit template
display.

Thanks.

Alan


[quoted text, click to view]

yhhuang NO[at]SPAM online.microsoft.com
9/1/2003 3:38:22 AM
Hello Alan,

Thanks for sharing the experience in the group.

To specify it more clearly, Validation Controls can't be used to validate
the whole datagrid. On the other hand, you can use the templated columns of
the datagrid along the edit mode. The EditITemTemplate can be configured to
include the textbox hooked up with data. In this same template you can add
a Validation control or custom validation to be set against the TextBox.
When the user selects editing a specific row, The datagrid will
automatically transform the data to be displayed in textboxes. Then the
validation control can validate the user entry.

Please post here if you have follow up questions.

Thanks again for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "Alan Z. Scharf" <ascharf@grapevines.com>
!From: "Alan Z. Scharf" <ascharf@grapevines.com>
!References: <e2P8wFkbDHA.880@TK2MSFTNGP09.phx.gbl>
!Subject: Re: Datagrid Validation - Template 'Control to Validate'?
!Date: Fri, 29 Aug 2003 12:13:18 -0400
!Lines: 19
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.3718.0
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3718.0
!Message-ID: <uq9d4hkbDHA.652@tk2msftngp13.phx.gbl>
!Newsgroups: microsoft.public.vsnet.general
!NNTP-Posting-Host: 207-237-240-45.c3-0.nyw-ubr2.nyr-nyw.ny.cable.rcn.com
207.237.240.45
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.vsnet.general:11954
!X-Tomcat-NG: microsoft.public.vsnet.general
!
!
!
!Never mind.
!
!I figured it out - validation control has to be placed in edit template
!display.
!
!Thanks.
!
!Alan
!
!
!> Alan Z. Scharf
!> GrapeVine Systems
!> New York City
!>
!>
!
!
!
AddThis Social Bookmark Button