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

Is there a way to sort a hierarchy on child grid columns?

1 Answer 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lynne
Top achievements
Rank 1
Lynne asked on 01 Dec 2011, 07:49 PM
I have a three-level hierarchical grid, in which I'd like each of the sub/child grids to be sorted based on a column.

I'm having no problem getting the top-level grid sorted since there's an OrderBy clause in the query that populates the CollectionViewSource that the grid is bound to.

Is there a property that can be set on the sub-grids to cause them to, by default, sort on a particular column?

Example:

Customers (sorted on last name)
 Orders (sorted by date)
   Order Line Items (sorted by quantity)
        

Thanks.

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 02 Dec 2011, 09:16 AM
Hi Lynne,

Based only on the information provided, I get the impression that you can sort the child grids' source in the same manner as you did on the main sort. Am I wrong or I am missing something ? 
Furthermore,  you can either set the SortingState property of the column you want or define a SortDescriptor. 
Will any of those approaches suit your needs ? 

Kind regards,
Maya
the Telerik team

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

Tags
GridView
Asked by
Lynne
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or