Grouping by nested object

6 posts, 0 answers
  1. leapopotomus
    leapopotomus avatar
    10 posts
    Member since:
    Dec 2007

    Posted 17 Jan 2008 Link to this post

    Hi,
    I am trying to group my gridview data by a nested object like this:

    DataSource = List<Person>

    GroupExpression: Address.Suburb as Sub Group By Sub

    This results in the data being correctly sorted but the grid will not display any group headers. Is there a way to do this?

    thanks
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 18 Jan 2008 Link to this post

    Hi Bart,

    Thank you for writing.

    Currently, the RadGridView partially completes the grouping operation to speed-up the process of adding multiple grouping and/or sorting expressions. You need to explicitly update the grouping panel for the grouping operation to complete, as shown in the code below:

    radGridView1.MasterGridViewTemplate.GroupByExpressions.Add(tbGroupExpressions.Text, tbFormatString.Text); 
    radGridView1.UpdateGroupPanel(); 
     

    Should you have further questions, please write us back.

    Best regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. leapopotomus
    leapopotomus avatar
    10 posts
    Member since:
    Dec 2007

    Posted 20 Jan 2008 Link to this post

    Hi Evtim,
    Thanks for your reply, but I still can not get the grid to show group headers when trying to group by a nested object property.

    Even if i do not add the grouping expression programatically and at run-time right click on the column and select 'group by this column', it will group the data but will not show group headers. If i do this for any other column it works fine.

    The object I am binding too is structured like this:

    Class:         Order
    Properties:  Description, Date, Service

    Class:         Service
    Properites:  Id, System

    The columns in the grid are:

    Date, Description, Service.System

    and my datasource is a List<Order>

    Date and Description will group fine with group headers, but when i group with Service.System (either programitcally or at run-time) there are no group headers??

    thanks,
    bart
  4. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 21 Jan 2008 Link to this post

    Hello Bart,

    Thank you for the clarification.

    We reproduced the issue and logged it with high priority. It will be addressed in our Q1 release.

    Your Telerik points have been updated. If you have any additional questions, please contact us.

    All the best,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Ofer
    Ofer avatar
    19 posts
    Member since:
    Jan 2012

    Posted 02 Feb 2012 Link to this post

    Hi,

    Way can't i fined this method -> radGridView1.UpdateGroupPanel();  
  6. Stefan
    Admin
    Stefan avatar
    2908 posts

    Posted 07 Feb 2012 Link to this post

    Hi Ofer,

    Thank you for writing.

    This method was a part of a deprecated RadGridView implementation. For more information about the grouping capabilities of our latest grid, please refer to the following help section: http://www.telerik.com/help/winforms/gridview-grouping-setting-groups-programmatically.html.

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
     
    Kind regards,
    Stefan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top