Kendo Grid Transport with traditional = true param

2 posts, 0 answers
  1. Josh
    Josh avatar
    4 posts
    Member since:
    Feb 2014

    Posted 19 Sep 2014 Link to this post

    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 element. However, this no longer passes the sort parameter. I have re-worked an example here:

    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:

    sort:[object Object]

    Is there a way around this?

  2. Rosen
    Rosen avatar
    3247 posts

    Posted 23 Sep 2014 Link to this post

    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.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top