Stefan Dobrovolny
Top achievements
Rank 1
Stefan Dobrovolny
asked on 21 Apr 2010, 08:45 AM
Hello,
I am looking for a way how to show the grid column headers in a hierarchical way (for example the top level would be year and lower level would be quarters then months and so on (as shown in attached jpg)).
The data I am trying to display are already flattened in my VM to the column header hierarchy lowest level - so only the lowest level acts as the "real" column headers. I just need the higher levels to be data-bound, displayed and aligned in the headers section.
Any pointer how to achieve this would be appreciated.
Thanks, Stefan
I am looking for a way how to show the grid column headers in a hierarchical way (for example the top level would be year and lower level would be quarters then months and so on (as shown in attached jpg)).
The data I am trying to display are already flattened in my VM to the column header hierarchy lowest level - so only the lowest level acts as the "real" column headers. I just need the higher levels to be data-bound, displayed and aligned in the headers section.
Any pointer how to achieve this would be appreciated.
Thanks, Stefan
5 Answers, 1 is accepted
0
Hello Stefan,
Please check this blog post for more info on how to achieve this.
Sincerely yours,
Vlad
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
Please check this blog post for more info on how to achieve this.
Sincerely yours,
Vlad
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Stefan Dobrovolny
Top achievements
Rank 1
answered on 21 Apr 2010, 11:42 AM
Thanks Vlad,
That is almost what I needed.
Would it be possible to use more than one level of grouping using the described technique?
~Stefan
That is almost what I needed.
Would it be possible to use more than one level of grouping using the described technique?
~Stefan
0
Hello Stefan Dobrovolny,
It gets more complicated but I think it is achievable. Can you please attach a picture of the desired output so I can try prepare a small sample for you ?
Regards,
Pavel Pavlov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
It gets more complicated but I think it is achievable. Can you please attach a picture of the desired output so I can try prepare a small sample for you ?
Regards,
Pavel Pavlov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Stefan Dobrovolny
Top achievements
Rank 1
answered on 30 Apr 2010, 09:35 AM
Hi Pavel,
What I'd like to achieve is to having headers behave as they do in the OLAP grids:
I have the hierarchy (hierarchical structure) of items and I would like to show the hierarchy as the column headers.
The data inside the grid are "bound" only to the "leaves" of the hierarchy and any other logic is handled in code behind.
Best regards, Stefan
What I'd like to achieve is to having headers behave as they do in the OLAP grids:
I have the hierarchy (hierarchical structure) of items and I would like to show the hierarchy as the column headers.
The data inside the grid are "bound" only to the "leaves" of the hierarchy and any other logic is handled in code behind.
Best regards, Stefan
0
Hello Stefan Dobrovolny,
Ok , indeed this gets a bit beyond the capabilities of RadGridView. Actually there has been an increasing demand for such feature lately so we are planning either a new control ( kind of pivot grid) , or extending the current RadGridView to cover such scenarios.
As I said such behavior is achievable even with the current version of RadGridView, but the hierarchy-header logic should be manually implemented in a user control which later can be placed above the regular header. The code will be complicated and hard to maintain. In case you have fixed column widths and turn off the column resizing - this may simplify the code.
With these thoughts in mind I would recommend to carefully reconsider whether you want to go that way.
Greetings,
Pavel Pavlov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
Ok , indeed this gets a bit beyond the capabilities of RadGridView. Actually there has been an increasing demand for such feature lately so we are planning either a new control ( kind of pivot grid) , or extending the current RadGridView to cover such scenarios.
As I said such behavior is achievable even with the current version of RadGridView, but the hierarchy-header logic should be manually implemented in a user control which later can be placed above the regular header. The code will be complicated and hard to maintain. In case you have fixed column widths and turn off the column resizing - this may simplify the code.
With these thoughts in mind I would recommend to carefully reconsider whether you want to go that way.
Greetings,
Pavel Pavlov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.