@(Html.Kendo().Grid<
MyModel
>()
.DataSource(ds => ds
.Custom()
.Batch(false)
.Schema(schema => schema.Parse(@<
text
>parseData</
text
>))
.Transport(r => r.Read(c => c.Action("GetStuff", "MyController",
new
{
prop = Model.prop
})
.Data("getExtraData()").Type(HttpVerbs.Post)))
.PageSize(1)
.ServerPaging(true)
)
The getExtraData() method runs the first time the grid is loaded. I want to refresh the grid later, so I use this c
$('#messagesgrid').data('kendoGrid').dataSource.read();
$('#messagesgrid').data('kendoGrid').refresh();
The method getExtraData() has changed, so when it refreshes I want it to call this method again to attach the data to my request. However the method does not run even though the grid is refreshed.
How can I make sure that it runs every time the grid is updated?