Hi,
I want to add a 2nd header row to my radgrid header. I am using Q3 2007 version. I know i can add a new row to header in gridview by inserting a GridViewRow object as shownbelow (inside ItemDataBound event of grid)
GridViewRow gvr = e.Row;
switch (gvr.RowType)
{
case DataControlRowType.HeaderRow:
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.BackColor = Color.Red;
cell.ForeColor = Color.White;
cell.ColumnSpan = GridView1.Columns.Count;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = subcategory;
row.Cells.Add(cell);
GridView1.Controls[0].Controls.AddAt(0, row);
break;
}
}
How can I do this in Radgrid? I tried replicating the process using GridDataItem, but teh row didn't show up on the grid.
My grid columns are created dynamically; the count is not known before. There's grouping happening inside the grid too.
Please help. This is a very urgent & critical one.
Thanks,
Sija
I want to add a 2nd header row to my radgrid header. I am using Q3 2007 version. I know i can add a new row to header in gridview by inserting a GridViewRow object as shownbelow (inside ItemDataBound event of grid)
GridViewRow gvr = e.Row;
switch (gvr.RowType)
{
case DataControlRowType.HeaderRow:
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.BackColor = Color.Red;
cell.ForeColor = Color.White;
cell.ColumnSpan = GridView1.Columns.Count;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = subcategory;
row.Cells.Add(cell);
GridView1.Controls[0].Controls.AddAt(0, row);
break;
}
}
How can I do this in Radgrid? I tried replicating the process using GridDataItem, but teh row didn't show up on the grid.
My grid columns are created dynamically; the count is not known before. There's grouping happening inside the grid too.
Please help. This is a very urgent & critical one.
Thanks,
Sija