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

[Solved] Question about RadGrid sorting behavior

1 Answer 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 02 May 2008, 07:44 PM
Suppose the user is on page 3 of a RadGrid and column 1 shows these values: B, A, C.  The user sorts on column 1.

This is what actually happens:
The whole grid is sorted, and the user ends up on page 3 of the sorted grid.  This page probably shows different records compared to what they were just looking at.  during usability testing my users were surprised and confused by this behavior; they didn't know what was going on.

This is what my users want to happen instead:
They want the records on the current page to be sorted. For example if they are on page 3 viewing records B, A, and C, they want to sort on column 1 and see A, B, C.  If they sort on column 1 again they want to see C, B, A.

So ... is it possible to do what my users want?  I realize it's not the built-in behavior, and I do understand the logic behind the built-in behavior, but is it possible for me to customize the RadGrid to make it do what my users expect?

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 05 May 2008, 01:00 PM
Hello Kelly,

Thank you for contacting us and for the interesting question.

You are correct -- this is not the Grid behavior what the users were expecting in your case. The Grid sorting can be customized though and you will be able to implement your sorting if you manage to sort the data the way you expect. Please, look at the following demo for a custom sorting implementation:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/Sort/DefaultCS.aspx

where some custom implementations are applied over the second Grid on the page.

Unfortunately the Grid SortExpressions are applied over the whole data. The pages does not separate or group the data, but just allow the users to see the data in user-friendly order.

Have you considered applying the Grid Grouping functionality?

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GroupBy/OutlookStyle/DefaultCS.aspx

Thus you can group the data as per your requirements and the user sorting by any field will actually sort the data from each of the groups and not the whole data. Although I'm not use if this would applicable to your scenario, going with the built-in features is always the better choice for further maintenance.

I hope this makes sense and help you implementing a user-friendly application.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Kelly
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or