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

Grouping by nested object

5 Answers 191 Views
GridView
This is a migrated thread and some comments may be shown as answers.
leapopotomus
Top achievements
Rank 1
leapopotomus asked on 18 Jan 2008, 01:33 AM
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

5 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 18 Jan 2008, 09:32 AM
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
0
leapopotomus
Top achievements
Rank 1
answered on 20 Jan 2008, 10:43 PM
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
0
Dwight
Telerik team
answered on 21 Jan 2008, 10:24 AM
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
0
Ofer
Top achievements
Rank 1
answered on 02 Feb 2012, 04:01 PM
Hi,

Way can't i fined this method -> radGridView1.UpdateGroupPanel();  
0
Stefan
Telerik team
answered on 07 Feb 2012, 01:26 PM
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 >>
Tags
GridView
Asked by
leapopotomus
Top achievements
Rank 1
Answers by
Dwight
Telerik team
leapopotomus
Top achievements
Rank 1
Ofer
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or