This is a migrated thread and some comments may be shown as answers.

Wrap request parameters as JSON

0 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dima
Top achievements
Rank 1
Dima asked on 29 Oct 2012, 08:24 AM
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!

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dima
Top achievements
Rank 1
Share this question
or