(i want 2 use grid view in asp.net application i don not know that how i merge column header and add subheading in my grid view.
Column will be dynamically it may be 2,4,6 and in last column i want cumulative total of progress )
i send a sample view created in PHP


CrishRank #1,487 · 1.1K reputationPosted Dec 1, 2010, 9:47 PM EST
Its a very complicate question but i have one solution for it Please check the below code . it will help you.
protected void grdItems_DataBound(object sender, EventArgs e)
{
GridViewRow gvr = (GridViewRow)sender;
if (gvr.RowType == DataControlRowType.Header)
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.ColumnSpan = 1;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = "Quantity";
row.Cells.Add(cell);
cell = new TableCell();
cell.ColumnSpan = 4;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = "Description";
row.Cells.Add(cell);
cell = new TableCell();
cell.ColumnSpan = 1;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = "Amount";
row.Cells.Add(cell);
grdItems.Controls[0].Controls.AddAt(0, row);
}
}
If you want to more detail about it than just go for below link.
http://forums.asp.net/t/1573344.aspx