Adding GridViewGroupRow by Code

4 posts, 0 answers
  1. Modi
    Modi avatar
    5 posts
    Member since:
    Sep 2010

    Posted 30 Sep 2010 Link to this post


    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?

  2. Maya
    Maya avatar
    4062 posts

    Posted 04 Oct 2010 Link to this post

    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,
    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
  3. Chris Lynch
    Chris Lynch avatar
    15 posts
    Member since:
    Mar 2010

    Posted 22 Aug 2012 Link to this post

    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
  4. Nick
    Nick avatar
    593 posts

    Posted 27 Aug 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top