This question is locked. New answers and comments are not allowed.
I have "sortable" enabled on an grid bound by Ajax. I click a column header once, sorts ascending. Twice, descending. Three times, not-sorted. I should be able to shift back and forth between ascending and descending without reverting to an unsorted state.
Is this a bug, or is there some way to disable the 3rd "unsorted" state?
Is this a bug, or is there some way to disable the 3rd "unsorted" state?
6 Answers, 1 is accepted
0
Hi Michael,
Atanas Korchev
the Telerik team
By design the grid moves to unsorted state. Currently binary sorting mode (sorted / unsorted) is not supported.
Regards,Atanas Korchev
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
Mattias
Top achievements
Rank 1
answered on 14 Dec 2010, 01:39 PM
+ 1 vote for this
0
Pat
Top achievements
Rank 1
answered on 20 Jan 2011, 01:44 AM
+2
0
Randy
Top achievements
Rank 1
answered on 12 Mar 2011, 02:13 AM
I do not particularly like this "design".
How about an option to make it either ascending or descending?
Randy
How about an option to make it either ascending or descending?
Randy
0
Hello,
Atanas Korchev
the Telerik team
Thank you for your feedback. We will consider this as a feature request and will implement it in a future release.
Regards,Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
keymmachine
Top achievements
Rank 1
answered on 23 Mar 2011, 08:02 PM
So I created a workaround for this issue. What I did was, using the jQuery Query String plugin, I replaced the "no-state" sort ("~") with the next ascending sort on page load. The one catch with this is if your default sort is descending then you need to hardcode the next sort on that specific column.
Here is my code for a grid with a default descending column (CreatedDate in my case):
Here is the code for a grid with a default ascending column:
Hopefully this might help a few people.
Andrew
Here is my code for a grid with a default descending column (CreatedDate in my case):
$(function () { var order = $.query.get('orderBy') == "" ? "CreatedDate-asc" : $.query.get('orderBy').replace("-desc", "-asc"); var orderstring = $('.t-sorted a').attr('href').replace("~", order); $('.t-sorted a').attr('href', orderstring);});Here is the code for a grid with a default ascending column:
$(function () { var order = $.query.get('orderBy').replace("-desc", "-asc"); var orderstring = $('.t-sorted a').attr('href').replace("~", order); $('.t-sorted a').attr('href', orderstring);});Hopefully this might help a few people.
Andrew