This is a migrated thread and some comments may be shown as answers.

Hiding column header when ColumnGroup is defined

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 27 Dec 2012, 07:38 AM
Hi,

im using a columngroup as described here.
It does work fine except that in one case i want to hide the header of the sub-columns so that i have one header for two columns only.

e.g.:
| my column group header|
|  col1 -data1| col 2- data1|
|  col1 -data2| col 2- data2|
|  col1 -data3| col 2- data3|

and so on. Is there some kind of a "hidechildheader" option available on a GridColumnGroup? or something like "hideheader" on the column itself?

regards!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Dec 2012, 09:42 AM
Hi,

I am not quite sure about your requirement. I suppose you want to hide the header. Here is the sample code.
C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
        GridHeaderItem item = (GridHeaderItem)RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0];
        item["Uniquename"].Style.Add("display", "none");
}

Thanks,
Princy.
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or