This is a migrated thread and some comments may be shown as answers.
Empty Group
7 Answers 70 Views
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 21 Jan 2009, 02:50 PM
Could I ask if I'm able to create empty group with RadGrid grouping feature?

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,
Alexander

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Jan 2009, 11:39 AM
Hi Alexander,

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:
help topic
demo

Sincerely yours,
Pavlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Felipe Saldana
Top achievements
Rank 1
answered on 14 Aug 2009, 05:16 PM
I am running into the same problem as Alexander. I need groups to appear even though there aren't any records.

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.


Thanks,

Felipe
0
Mira
Telerik team
answered on 19 Aug 2009, 10:53 AM
Hi Felipe,

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.

Sincerely yours,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Felipe Saldana
Top achievements
Rank 1
answered on 19 Aug 2009, 11:19 PM
Mira,

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.


Felipe
0
Mira
Telerik team
answered on 21 Aug 2009, 07:35 AM
Hello Felipe,

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.

Sincerely yours,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
James
Top achievements
Rank 1
answered on 25 Jan 2016, 03:24 PM

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.

0
Pavlina
Telerik team
answered on 25 Jan 2016, 03:48 PM
Hi,

Thank you for sharing your findings with the community.

Regards,
Pavlina
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
Tags
Grid
Asked by
Alexander
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Felipe Saldana
Top achievements
Rank 1
Mira
Telerik team
James
Top achievements
Rank 1
Share this question
or