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

Grid not sending sort descriptor to the server

2 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shameer
Top achievements
Rank 1
Shameer asked on 09 May 2014, 06:22 AM
Hello,

I am a first time user of Kendo UI for ASP.NET MVC. The version I am using is Q1 2014 (2014.1.318). In Kendo Grid while doing custom server binding, if I keep on clicking a column header for sorting, on every third click, the grid misses to send the sort descriptor to the server and the sort order falls back to default . The same happens when I tried the custom server binding from the demo which comes with the product installation. I sorted the column 'Ship City' and on every third click I can see that the 'Grid-sort:' parameter value is empty (I used Chrome developer tool to check this). On the next two clicks, I can see it as 'ShipCity-asc' and 'ShipCity-desc'. I have attached a screen shot which shows the issue in the demo. Can anyone kindly suggest why this might be happening?

Thanks

Shameer

2 Answers, 1 is accepted

Sort by
0
Accepted
Victor
Top achievements
Rank 1
answered on 09 May 2014, 09:20 AM
Hi Shameer!

I would guess this is by design - as the screenshot looks the sort direction arrow is also gone. We prefer disallowing "unsorting" and also prefer single column sort since we think the multi-sort is very strange usability-wise. SO - in our configuration we almost always use:

@Html.Kendo().Grid()
//Other options
.Sortable(sorting => sorting.SortMode(GridSortMode.SingleColumn).AllowUnsort(false))

Hope this helps!
/Victor
0
Shameer
Top achievements
Rank 1
answered on 14 May 2014, 12:58 AM
Thanks Victor. Your code snippet removed the un-sorting.

Thanks

Shameer
Tags
Grid
Asked by
Shameer
Top achievements
Rank 1
Answers by
Victor
Top achievements
Rank 1
Shameer
Top achievements
Rank 1
Share this question
or