Click here to Skip to main content
11,928,078 members (27,499 online)
Rate this:
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 19:19pm
Edited 3-Feb-11 19:28pm
Sunasara Imdadhusen 4-Feb-11 0:22am
What's your problem?
Dwayne J. Baldwin 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.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