Gridview grouping - group by id, but display name in group header

2 posts, 0 answers
  1. Shaun
    Shaun avatar
    18 posts
    Member since:
    May 2012

    Posted 30 May 2012 Link to this post


    Probably a trivial task, but I can't seem to gleam how to do this from the documentation.   One of the columns for my gridview is bound to a business object which has an ID and a Name property. 

    It groups just fine by this column when I do: GroupMemberPath="Foo.Id", however this puts the Id in the group header.  If I group by Foo.Name, that makes the header look accurate - however this is technically incorrect.

    The ideal behavior is to group by id, but display the name in the row group header.   I have tried using the GroupHeaderTemplate, however its Group.Key only seems to contain the column which has been grouped by.   Is there any way to group by the entire entity?  What's the recommended way to handle this?

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 30 May 2012 Link to this post


     You could use a generic GroupDescriptor. I would recommend you to go through this forum thread for an example.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top