For e.g i need to display a list of employees. So in my gridview i have my first column as EmpName and 2nd and 3rd column and 4th column as template field with textboxes.
So for n number of employees , n number of textboxes would be created dynamically.
<asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound">
<asp:BoundField DataField="EmpName" HeaderText="EmpName" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
you can get reference of text box by prefixing the grid id you give
once the page gets loaded into browser grid becomes a table and it will have the same id as grid and whatever the objects that you placed inside the grid will have the id of the grid and its own id but seperated with '_'.
hope this helps you
By msJones in forum ASP.NET
Last Post: 09-08-2003, 02:33 AM
By Lela in forum VB Classic
Last Post: 01-30-2003, 08:03 AM
By Rudolph Jones in forum VB Classic
Last Post: 05-16-2001, 05:24 PM
By amukelani shandlale in forum Web
Last Post: 04-24-2001, 11:46 AM
By Murray Foxcroft in forum Web
Last Post: 11-02-2000, 02:42 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL