Click here to Skip to main content
11,806,590 members (68,871 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB VB.NET
Hii Experts I have a grifview in which 3 textbox are there in the edit item template.I want to validate these textboxes with required field validation .I have done using very old fashion validation(given below).Please suggest me some new technique for validation inside gridview edit item template.If possible suggest me in javascript.Here is my source code

<asp:GridView ID="GvEditEvent" runat="server" Width="500px" AutoGenerateColumns="False" DataKeyNames="EId" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true">
            <asp:TemplateField HeaderText="Event Date">
                <asp:TextBox ID="txtEDate" Text='<%#Bind("EDate") %>' runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2"   runat="server" ControlToValidate="txtEDate" ErrorMessage="Please enter EventDate">*</asp:RequiredFieldValidator>
                  <ajaxToolkit:CalendarExtender ID="CalendarExtender2"
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("EDate") %>'>
Is there any other way of giving validation .Because I m not able to show validation summery in the gridview
Thank You
Sandeep Mishra
Software Developer
Posted 3-Feb-11 18:19pm
Edited 3-Feb-11 18:28pm
Sunasara Imdadhusen at 4-Feb-11 0:22am
What's your problem?
Dwayne J. Baldwin at 8-Feb-11 3:42am
Have you tried without using ID="RequiredFieldValidator2"? It should work fine without very old javascript. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 ppolymorphe 205
1 OriginalGriff 175
2 Richard Deeming 175
3 Sergey Alexandrovich Kryukov 170
4 Abhinav S 120
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 4 Feb 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100