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

[Solved] Error when setting a default sort order

6 Answers 179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg
Top achievements
Rank 1
Greg asked on 22 Mar 2012, 08:21 PM
When setting a default sort order like so:

.Sortable(sorting => sorting
.OrderBy(sortOrder => sortOrder.Add(o => o.Name).Ascending()))

Not all columns match the new sort.

Error is showing on the demo site as well. To replicate ....

Remove all default sorting, then manually sort by contact name. Alejandra Camino should be on top.
First record is Order Id 10281 on 8/13.

Click on header till no sorting is shown, then turn on default order by contact name.
First record is Order Id 10281 on 8/14

Am I missing something or is this a bug?

6 Answers, 1 is accepted

Sort by
0
Dadv
Top achievements
Rank 1
answered on 23 Mar 2012, 10:13 AM
Hi,

I try what you suggest and don't find any differences :

Remove all default sorting, then manually sort by contact name =>

first row : 
10281 Alejandra Camino Spain 08/14/1996

Click on header till no sorting is shown, then turn on default order by contact name =>
first row :
10281 Alejandra Camino Spain 08/14/1996

My try was made here
Did i miss something?
0
Greg
Top achievements
Rank 1
answered on 23 Mar 2012, 03:33 PM
Very strange ... I retried it and still have the error.  Look at the order date.

Using this demo: http://demos.telerik.com/aspnet-mvc/Grid/Sorting?theme=vista
Using Windows7 and using FF 11, IE 8 and IE 8 in compatibility mode. All look and act the same.


Try this. Select contact name for default sorting, then click header to sort.  when it gets back to ascending it should show the difference.

Screen shots attached.
0
Dadv
Top achievements
Rank 1
answered on 23 Mar 2012, 04:54 PM
Hmmm look the captures ( try on chrome last version and IE 7 to 9)

The only difference we could have is the culture (FR-fr France for me)?
0
Greg
Top achievements
Rank 1
answered on 02 Apr 2012, 06:56 PM
Did you try FF?

Just to make sure we're both doing it the same ...
http://demos.telerik.com/aspnet-mvc/Grid/Sorting?theme=vista

  1. Page will default to having the checked.
  2. Uncheck .
  3. Click button "Apply". This should remove any sorting.
  4. Click header of column "Contact Name" to sort one time.  This should show:
    • Order Id = 10281
    • Contact Name = Alejandra Camino
    • Ship Country = Spain
    • Order Date = 08/13/1996
  5. Click button "Apply". Make sure no check boxes are checked. This should remove any sorting.
  6. Check check-box "Contact Name".
  7. Click button "Apply". Grid is now sorting by "Contact Name" again. Only sorting is different:
    • Order Id = 10281
    • Contact Name = Alejandra Camino
    • Ship Country = Spain
    • Order Date = 08/14/1996 <-- This is different then when you manually sorted grid by clicking a column header.
0
Greg
Top achievements
Rank 1
answered on 12 Apr 2012, 04:36 PM
So nobody else is getting this error?
0
Greg
Top achievements
Rank 1
answered on 16 May 2012, 09:14 PM
Just bumping this up to see if anyone else is getting this reproducible error.
Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Dadv
Top achievements
Rank 1
Greg
Top achievements
Rank 1
Share this question
or