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

RadGrid Not Sorting as Expected

2 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 12 Sep 2008, 03:38 PM
I've got data that looks something like this...

Section

SubSection

Version

ABC

Apples

1

DEF

Pears

1

DEF

Oranges

1

DEF

Pears

2

DEF

Pears

3


and would like it to sort it by Section (asc), Subsection (asc) and then Version (desc).  In my RadGrid/MasterTableView/SortExpressions section, I add the following...
<rad:GridSortExpression FieldName="Version" SortOrder="" /> 
<rad:GridSortExpression FieldName="SubSection" SortOrder="Ascending" /> 
<rad:GridSortExpression FieldName="Section" SortOrder="Ascending" /> 
 

According to my understanding of this article, the result should be:

Section

SubSection

Version

ABC

Apples

1

DEF

Oranges

1

DEF

Pears

3

DEF

Pears

2

DEF

Pears

1


But it's not.  "Version" is always sorted in ascending order.  The only way I can get anything to sort in descending order is if I remove all but that sort expression.

What am I missing?

Thanks for the help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 15 Sep 2008, 11:37 AM
Hello James,

Attached to this message, is a sample application, which handles a functionality close to the one that you mentioned and behaves as expected.
Let me know what your findings are.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
James
Top achievements
Rank 1
answered on 15 Sep 2008, 01:37 PM
Aha!

I was missing the AllowMultiColumnSorting="true" directive in the MasterTableView.  Didn't know that even existed.

With that attribute, it's sorting exactly as expected.

Thanks for the help.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Yavor
Telerik team
James
Top achievements
Rank 1
Share this question
or