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

Kendo Grid Transport with traditional = true param

1 Answer 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 19 Sep 2014, 01:27 PM
I've been trying to figure out how to send a multi-select list back to my MVC controller, what I ended up having to do was pass the traditional: true parameter into the transport.read element. However, this no longer passes the sort parameter. I have re-worked an example here:

http://dojo.telerik.com/aPAQ/2

Note that I have commented out type: 'odata', because I am not using odata (no, the grid does NOT load, but I am looking at the request that is built). The key here is to look at the request that is sent in firebug or some other dev util (chrome dev tools). Here is the sort parameter now:

take:20
skip:0
page:1
pageSize:20
sort:[object Object]

Is there a way around this?

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 23 Sep 2014, 08:06 AM
Hi Josh,

Indeed, enabling traditional option will not serialize nested objects as described in this jQuery help article. In order to serialize the data send to the server to the appropriate format when using DataSource with a remote transport, you should use the transport.paramterMap function. For instance you may check this parameterMap implementation, which demonstrates array serialization for ASP.NET MVC default model binder.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Josh
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or