Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2006, 05:59 AM
Registered User
 
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Shadane
Default Field Validation in an Editable Data Grid

This is my first post, so be gentle.

I need to add in field validation to my data grid, when a row is in 'edit' mode.

I have no idea where to even start on this. can some one point me in the right direction pls.

Thanks you

 
Old October 2nd, 2006, 07:25 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In your <edititemtemplate> tag, add your textbox controls or whatever you are trying to validate and add your validator here as well.

This is an example:

<EditItemTemplate>
<asp:TextBox ID="txt" CssClass="inputEdit" Runat=server>
</asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" ControlToValidate="txt" runat="server">Required</asp:RequiredFieldValidator>
</EditItemTemplate>

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
 
Old October 2nd, 2006, 08:31 AM
Registered User
 
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Shadane
Default

:) Thank you

I dont want my work done for me. Then how am I supposed to learn :)

Thank you for your help/ guideline - it helps me on the right path which is all i wanted.


 
Old October 2nd, 2006, 09:02 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Your welcome.

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Rows in an Editable Data Grid RichardP ASP.NET 1.0 and 1.1 Professional 2 March 1st, 2006 02:19 PM
validation of one cell of a Data Grid to another Ljhopkins ASP.NET 1.0 and 1.1 Basics 1 November 5th, 2005 01:53 AM
Formatting the date field in Data Grid abinashpatra ASP.NET 1.0 and 1.1 Basics 2 April 21st, 2005 04:01 AM
Editable field of textbox vikas_76 Pro JSP 1 June 18th, 2004 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.