Jagjit Saini

Jagjit Saini

  • NA
  • 196
  • 38.2k

Common Heading for multiple columns in Gridview

Aug 5 2018 10:10 PM
Hi
 
I want common heading for columns in Gridview .
 
For L1,L2,L3 i want to display 1 common Heading Area-1 .
 
or L4,L5,L6 i want to display 1 common Heading Area-2 .
 
<asp:GridView ID="gvwBfbStructure" runat="server" AutoGenerateColumns="false" CssClass="table table-striped"> <Columns> <asp:BoundField DataField="Location" HeaderText="Store Type" ReadOnly="True" SortExpression="Location" /> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L1") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L2") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L-3") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L4") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L5") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" Text='<%# Eval("L6") %>' runat="server" /> </ItemTemplate> </asp:TemplateField> </asp:GridView>
 
Thanks

Answers (6)