hi, i created a gridview with two columns and 8 rows dynamically. All the rows are empty and editable at runtime. I am giving column names for this grid from some other .aspx page by passing column names using querystring.Because i am using this grid for three different pairs of column names. i would like to know how to apply Required Field Validator, Regular Expression Validator and Range Validator on Gridview textboxes. So that by using those validators i want to validate user inputs. And i would also like to know how to add rows at runtime for this grid.
I am using ASP.net 2.0 and C#.net for this.(Visual Studio 2005)
The code i am using to create gridview is below.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LoadData.aspx.cs" Inherits="LoadData" %>
<form id="form1" runat="server">
<asp:GridView ID="GrdDynamic" runat="server" AutoGenerateColumns="False" ForeColor="#333333" BorderColor="GradientInactiveCaption" BorderStyle="Solid" style="z-index: 108; left: 24px; position: absolute; top: 13px">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
View Complete Post