-2

I have a GridView and instead of putting all headers in one row, I want to divide the headers in two rows. The first group of headers will be in the first row and the second group of headers will be in the middle of the GridView after inserting all entries of the first group of headers.

How to do that?

In addition, it will be very nice to have the same looking format of gridview like the one in this link. For instance, I really would to have one row for a big title and the second row for the column headers, and repeat them in the mid of the GridView

user730077
  • 199
  • 1
  • 13

1 Answers1

0

If you want to split your GridView in the fashion you're talking about, you'd have to just have 2 separate GridViews using the same data source. You'd also have to manually setup the Columns.

<asp:GridView id="grd1" runat="server">
<!-- Manually setup columns -->
</asp:GridView>
<asp:GridView id="grd2" runat="server" >
<!-- Manually setup columns -->
</asp:GridView>

grd1.DataSource = DataSource;
grd2.DataSource = DataSource;
grd1.DataBind();
grd2.DataBind();

As for styling, the link you referenced links to ways to style up your GridView.

Doozer Blake
  • 7,427
  • 1
  • 27
  • 40