Let me solve your problem.
for example you want to show for columns in the gried view fetched by sql query, your template fields will look like this in the griedview
<Columns>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
or you can copy and paste this code in between you gridview tag i.e.
<asp:GridView ID="GridView1" runat="server">
and
</asp:GridView>
It will create GridView with four Template Field four you.
Now for example your sql statement
is like " select Name, Address, Country, Qualification from tablename"
then add the below code to your gridview code(Just add Text property in all TextBox and Label field)
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
and same in the
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
So your exact code for your one column will be like
<asp:TemplateField HeaderText="User Id">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
In Bind("Pleae give Exact your Column Name")
Same add this code for all the column.
Please Mark it as Resolved if it resolved.
Please revert back to me in case of you find any doubt.
Thanks
Suman Zalodiya