Hello Julian,
Now I understand what are your requirements, thank you.
Have you considered using our RadPivotGrid control? Your structure seems to be a great match for this control. It is available for the version you are using - UI for ASP.NET AJAX Q3 2012 SP2. You have all the elements in a pivot control - including but not limited to column and row headers, totals and grand totals and calculations.
RadPivotGrid Overview demo
To answer your question, the programmatic creation of the multicolumn headers should look like that:
Possible places to add this code are Page_Init and Page_Load events, but considering the level of customization you need for your scenario you might have problems with ViewState so the first option may be the better one.
Then you need to set these custom groups to the column objects:
In the above example I add this code in ColumnCreated which is suitable only for autogenerated columns. If you add columns dynamically it would be best to set the ColumnGroupName property where you create them.
Regards,
Daniel
Telerik
Now I understand what are your requirements, thank you.
Have you considered using our RadPivotGrid control? Your structure seems to be a great match for this control. It is available for the version you are using - UI for ASP.NET AJAX Q3 2012 SP2. You have all the elements in a pivot control - including but not limited to column and row headers, totals and grand totals and calculations.
RadPivotGrid Overview demo
To answer your question, the programmatic creation of the multicolumn headers should look like that:
GridColumnGroup group = new GridColumnGroup();RadGrid1.MasterTableView.ColumnGroups.Add(group);group.HeaderText = group.Name = "January";Possible places to add this code are Page_Init and Page_Load events, but considering the level of customization you need for your scenario you might have problems with ViewState so the first option may be the better one.
Then you need to set these custom groups to the column objects:
e.Column.ColumnGroupName = "January";In the above example I add this code in ColumnCreated which is suitable only for autogenerated columns. If you add columns dynamically it would be best to set the ColumnGroupName property where you create them.
Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items