I have implemented a Kendo grid using Html helpers. Everything works but the sorting, when I click the sorting arrows, it thinks and refreshes the same data.
<div id="SearchResults">
@{
var grid = Html.Kendo().Grid<SearchCOESGridViewModel>();
grid.Name("COESResultGrid")
.Columns(columns =>
{
columns.Bound(s => s.COESNo).Title(@SearchCOES.COESGridHeading);
columns.Bound(s => s.Postcode).Title(@SearchCOES.PostcodeGridHeading);
columns.Bound(s => s.AuditAuthNo).Title(@SearchCOES.AuditAuthGridHeading);
columns.Bound(s => s.COESNo).Title("").ClientTemplate("<a href='javascript:void(0)' data-id='#= COESNoValue #' class='edit-link'>" + @Grid.EditAction + "</a>").Sortable(false);
});
grid.DataSource(dataSource => dataSource
.Ajax()
.Sort(sort => sort.Add("COESNo").Ascending())
.Read(read => read.Action("SearchGridData", "PrepareCOES"))).AutoBind(false);
grid.Pageable();
grid.Sortable();
@grid
}
</div>
How can I do sorting if I am using ajax data binding?
The paging works fine. Its just the sorting that doesn't seem to sort, I am using Chrome and I can see a request being sent back, but no sort happens