Hi,
Is there any way to wrap request parateters as JSON while using MVC notation for dataSource?
For example, this grid will send parameters as contentType:application/x-www-form-urlencoded, but I'd like to send them as contentType: application/json.
In js notation I can use 'parameterMap' and stringify parameters there, but how I may handle this here:
@(Html.Kendo().Grid(Model).Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Id);
columns.Bound(p => p.Name);
})
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource.Ajax().Read(read => read.Url("Services/DataService.asmx/GetData"))
))
Thanks!
Is there any way to wrap request parateters as JSON while using MVC notation for dataSource?
For example, this grid will send parameters as contentType:application/x-www-form-urlencoded, but I'd like to send them as contentType: application/json.
In js notation I can use 'parameterMap' and stringify parameters there, but how I may handle this here:
@(Html.Kendo().Grid(Model).Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Id);
columns.Bound(p => p.Name);
})
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource.Ajax().Read(read => read.Url("Services/DataService.asmx/GetData"))
))
Thanks!