I want to add one row by default that contains textboxes & checkbox. How to add it. See pic As Attachmnet.
sandeep_1987
0
Newbie Poster
Recommended Answers
Jump to Post1. Create template columns to display textboxes and CheckBoxes in the GridView.
2. If you bind the GridView with a DataTable which is filled with records from a database, check if the DataTable has any rows. If it has no rows, add an empty record to the DataTable and then …
Jump to Postuse Template Fields like this
<asp:GridView ID="MYGRid" runat="server" AutoGenerateColumns="false"> <Columns> <asp:TemplateField > <ItemTemplate> <asp:CheckBox ID="ID" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText ="Name"> <ItemTemplate> <asp:TextBox ID="textbox1" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText ="Mobile Number"> <ItemTemplate> <asp:TextBox ID="textbox2" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText ="Age"> <ItemTemplate> <asp:TextBox ID="textbox3" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField> …
All 6 Replies
Ramesh S
129
Posting Pro
vuyiswamb
17
Posting Whiz
sandeep_1987
0
Newbie Poster
vuyiswamb
17
Posting Whiz
sandeep_1987
0
Newbie Poster
vuyiswamb
17
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.