I have a problem trying to handle server message error on client side after a read event on grid component
my grid is setting up:
@(Html.Kendo().Grid<myModel>().GetPageableGrid(gridName)
.Name(gridName)
.AutoBind(true)
.DataSource(dataSource => dataSource
.Custom()
.Type("aspnetmvc-ajax")
.PageSize(10)
.ServerPaging(true)
.ServerSorting(true)
.ServerFiltering(true)
.Transport(transport => transport
.Read(read => read.Action("search", "test"))
.Destroy(e => e.Action("delete", "test"))
)
.Schema(schema => schema
.Errors("Errors")
.Model(model =>
{
model.Id(p => p.modelID);
})
)
.Events(events =>
{
events.Error("OnRequestError");
events.RequestEnd("OnRequestEnd");
})
) ....
the javascript function:
function OnRequestError(e) {
alert(e.errors); // show 'undefined'
}
in the controller:
DataSourceResult result = new DataSourceResult
{
Errors = new { message }
};
return new JsonResult(result);
json response look like:
{"Data":null,"Total":0,"AggregateResults":null,"Errors":{"message":"The method or operation is not implemented."}}
I cant reach errors property on OnRequestError, I tryed differents aproacches but not results yet it is alway 'undefined'
I apreciate any help.