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

Adding GridViewGroupRow by Code

3 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Modi
Top achievements
Rank 1
Modi asked on 30 Sep 2010, 09:05 AM
Hi,

Can i add few GridViewGroupRow in RadGrid by code once user is grouping data.Once user is grouping data i want to add few groups.For those groups i don't have data in ItemSource of grid,But i want to add them based on the column based on which user has grouped .Can i do that?

Thanks,
Modi

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 04 Oct 2010, 11:35 AM
Hello Modi,

Please share a bit more information about your scenario and exact requirements. What exactly is the idea behind creating groups when no source for them is available ? Do you expect to create "empty" groups?

Sincerely yours,
Maya
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
Chris Lynch
Top achievements
Rank 1
answered on 22 Aug 2012, 08:26 PM
I have a similar need to add group rows that are not in the itemsource of the grid
the scenario is I have a chart tied to a grid, when the user groups coulumn in grid the bar chart update from its groups and the associated aggregation of those groups
Currently when the user group on a  column  that  is month and year the chart reflects only shows Months  that have data in grid
I need to show empty months (zero counts)  this is why I looking to manually add GroupRows
0
Nick
Telerik team
answered on 27 Aug 2012, 07:53 AM
Hi Modi,

Unfortunately, the GridView Data architecture does not allow the Empty groups to be shown in the ViewPort. 
You can add group descriptors on the fly which can determine groups  with no items, however the GridView will not display them. 
The approach you can take with this scenario is to create your own abstraction over the grouping functionality and, create your own custom "grouping" depending on either row hierarchies or row details.

Hope this makes sense! 

Kind regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Modi
Top achievements
Rank 1
Answers by
Maya
Telerik team
Chris Lynch
Top achievements
Rank 1
Nick
Telerik team
Share this question
or