HI
I found a problem about ASP.NET MVC Grid :
After web page loaded, the grid is empty (AutoBind(false), so there have no any data),
Click any column header (will invoke column sorting) but read action invoked unexpectedly,
even if ServerOperation(false).
@(Html.Kendo().Grid<HIS.Entity.Models.TYourModel1>()
.Name("SelectionGrid")
... Sortable is true ...
.AutoBind(false)
.Pageable(pageable => pageable.Enabled(false))
.Columns(columns =>
{
columns.Bound(column => column.xxxxx).Hidden();
})
.DataSource(dataSource =>
{
dataSource.Ajax()
.Batch(true)
.Model(model => model.Id(m => m.Key1))
.PageSize(20)
.ServerOperation(false)
.Events(events =>
{
events.DefaultEvents();
})
.Read(read => read.Action("Selection_Read", "YourController").Data("filterSelectionGrid"));
})
.Events(events =>
{
})
.HtmlAttributes(new { @style = "height: 85%; min-height: 180px" }))
Grid sorting ServerOperation(false) behavior not matched with description -
'... If set to false ... paging, sorting, filtering ... will be performed client-side' :
// Summary:
// Sets the operation mode of the DataSource. By default the DataSource will make
// a request to the server when data for paging, sorting, filtering or grouping
// is needed. If set to false all data will be requested through single request.
// Any other paging, sorting, filtering or grouping will be performed client-side.
//
// Parameters:
// enabled:
// True(default) if server operation mode is enabled, otherwise false.
public TDataSourceBuilder ServerOperation(bool enabled);
UI for ASP.NET MVC R2 2017 SP1
Visual Studio 2015 Enterprise
Best regards
Chris