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

[Solved] GridSortMode.MultipleColumn

1 Answer 134 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.
leblanc
Top achievements
Rank 1
leblanc asked on 18 Jan 2012, 08:43 AM
We are using 2011.2.712 in one of our projects and discovered a bug with GridSortMode.MultipleColumn

.Sortable(sorting => sorting.SortMode(GridSortMode.MultipleColumn)
                .OrderBy(sortOrder => sortOrder.Add(o => o.Section).Ascending())
                .OrderBy(sortOrder => sortOrder.Add(o => o.Township).Ascending())
                .OrderBy(sortOrder => sortOrder.Add(o => o.Range).Ascending())
                .OrderBy(sortOrder => sortOrder.Add(o => o.FarmSerialNumber).Ascending())
                .OrderBy(sortOrder => sortOrder.Add(o => o.TractNumber).Ascending())
            )

We found that the first select ajax request has all the correct order by clause, however, in the wrong order.
expected: section asc, township asc, range asc, farmserialnumber asc, tractnumber asc
actual: farmserialnumber asc, tractnumber asc, section asc, township asc, range asc

After subsequent paging the grid begins to behave correctly. 
Only the initial ajax load was incorrect.

Our work around was to rearrange the columns in the grid to match the sorting order.
Our grid columns were rearranged to :
*more columns* | section column | township column | range column | farmserialnumber column | tractnumber column

for all the paging to work 100% as expected with GridSortMode.MultipleColumn enabled.

I could not find this in the forum when we initially were troubleshooting this bug.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 Jan 2012, 08:39 AM
Hi Leblanc,

This issue is fixed since Q2 2011 SP1 release of the Telerik Extensions.

Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
leblanc
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or