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

How to access value of ParentGroup

3 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sean Wright
Top achievements
Rank 1
Sean Wright asked on 17 Jun 2010, 02:59 PM
Hello,

I am using a GridView in my Silverlight application. When my user sorts the grid's data by dragging column heading(s) to the top I need to be able to access the value (or values) in Telerik.Windows.Data.AggregateFunctionsGroup ParentGroup. I need to use that value (or values) for populating a variable.

Or, to put it simply...when a user sorts the GridView I need to be able to grab the value(s) of what they sorted the grid by.

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 17 Jun 2010, 03:14 PM
Hello Sean Wright,
It is a bit confusing ,
are you talking about sorting or about grouping ?

Dragging the column header performs grouping and clicking on it performs sorting .
Please clarify so I can provide further assistance

Best wishes,
Pavel Pavlov
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
Sean Wright
Top achievements
Rank 1
answered on 17 Jun 2010, 04:29 PM
Hi,

I apologize for the confusion; thanks for asking for clarification; let's see if I can provide it.

When the grid is grouped (via dragging one or more column headers) I need to be able to get the name (or names) of the column header(s) that the grid is being grouped by. So, if the "Estimate Code" and "Grade" column headers are used to group the grid, for example, I need to be able to get the values "Estimate Code" and "Grade."

Thanks again,

Sean
0
Pavel Pavlov
Telerik team
answered on 18 Jun 2010, 01:47 PM
Hello Sean Wright,

Ok , you can subscribe to the RadGridView.Grouping and RadGridView.Grouped events.

Within the event handler you can check the value of

e.GroupDescriptor.Member

It should contain what you are looking for.

e.g If you group by "Grade" , within the event you will find e.GroupDescriptor.Member to be equal to "Grade" ..as needed.

Best wishes,
Pavel Pavlov
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
Tags
GridView
Asked by
Sean Wright
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Sean Wright
Top achievements
Rank 1
Share this question
or