grid setOptions() deletes all data

2 posts, 0 answers
  1. Gavin
    Gavin avatar
    3 posts
    Member since:
    Jun 2016

    Posted 22 Jun 2016 Link to this post

    Hi, Am using Telerik MVC wrappers for creating a grid. Done an ultra simple example of this and this seems to be enough to repeat the issue:




    If I just use the above, I get the grid with all the data in it no problem, however if I decide I want to make it sortable on the fly, I run what I understand to be the correct js below, this just causes all the data to be deleted with no errors.


    $('#Search').data('kendoGrid').setOptions({ sortable: true });


    is there something you have to do with MVC wrapper settings to make the javascript methods less flaky?


    Also, am using latest trial version as of this date.




  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 24 Jun 2016 Link to this post

    Hi Gavin,

    I am afraid this will not work in case you are using a Server binding because the Grid does not expose such option and also you cannot modify the QueryString parameters (the collection is read only). in order to be able to set the sortable by using the setOption method you need to use an Ajax binding.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top