I've seen 'group by month' example in code library and I wish all 12 months were there, not only those existing in the data source.
I could use master-detail feature which would display empty detail table, but I would like to have common header consisting of only detail columns' names and some group information (like name of the group), that's why I think grouping feature suits better. Please let me know if I'm wrong and it's possible to create master-detail report, so that it looked as it was grouped.
Thanks in advance,
7 Answers, 1 is accepted
Unfortunately you cannot create an empty group with RadGrid grouping feature.
RadGrid supports grouping of items based on the value of a particular column - that is, the groups are created for each value in the source rows, and one cannot add values which are not present in the data.
Alternatively, you can consider using Hierarchical Grid.This is related to populating the collection of DetailTables of RadGrid MasterTableView.Each detail table (including the MasterTableView ) is control of type GridTableView. If you work in hierarchy mode, you can define what data is passed on each level.
For more information about hierarchy Grid please review the following links:
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I take it the RadGrid still does not have the "empty group" feature?
The only reason I choose the group feature for the grid is that I need to have the column headers appear only once and for the data in the Detail table.
From the demo link you provided this is not the case...each Detail table has a column header.
Is there any way to format a Hierarchical Grid to look like a Grouped Grid? Mainly the columns headers appearing only once and for the data in the Detail table.
I assume that the NestedView template will be suitable for your purposes - it gives you the freedom to design the overall structure and appearance of detail tables in hierarchical grid.
I recommend that you take a look at the following links:
NestedView template help topic
NestedViewTemplate Relations demo
I hope you will find them useful.
the Telerik team
I do not believe that Nested Templates is what I need.
From what I can tell, the problem with the Nested template approach is that I dont want the column header for the master table...but rather i want the column header for the nested table AND need it to appear only once in place of the column header for the master table.
The is essentially what "Grouping" does.
The nested template will have the nested column header per each nested table...which is exactly what i do not want.
For what it is worth, I did find a way to simulate an "empty group" for my purposes....basically you need to find a way to provide a record for the group...and use that record for something like "Create new entry in group"....I suppose you colud try to hide that record somehow too.
If you want the column header for the nested table appear only once and in the place of the column header for the master table, I suggest using 2 grids:
- the first as a header - only with detail table's header and all the data hidden
- the second displaying only the data and with headers not shown.
I am attaching a sample project implementing the suggested solution.
I hope you will find it useful.
the Telerik team
I stumbled across this thread trying to achieve the same thing and came up with a workaround I though I would share.
I simply added a new data row with the required grouping and added an identifier so that when the row is databound I simply check if it matches the identifier and then hide the row if it meets it. This leaves the grouped header with no rows beneath.
Thank you for sharing your findings with the community.