GridView Pager not updating when items added/deleted

3 posts, 1 answers
  1. Robert Kaucher
    Robert Kaucher avatar
    56 posts
    Member since:
    Oct 2010

    Posted 05 Jun 2013 Link to this post

    We are experiencing an issue with the pager on both the grid view and the list view so I suspect it is a problem in the configuration of the dataSource. Here is an example:
    http://jsbin.com/ifokup/3/

    If you add any number of items to the grid it does not page properly. If you run dataFieldSource.page(1) it does update but again only on what is in the dataSource at the time of running that line of JS code.
  2. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 07 Jun 2013 Link to this post

    Hello Robert,

    Indeed, the issue is caused by incorrect configuration. As you may know the autoSync option of the DataSource will automatically push the changes through the assign transport. However, as you are using a Local (in-memory) transport new items are not actually added to the original collection, thus its size is not changed and always reporting the initial count. For the scenario in question, you should set the autoSync option to false, which should resolve the issue you are facing.

    Regards,
    Rosen
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Robert Kaucher
    Robert Kaucher avatar
    56 posts
    Member since:
    Oct 2010

    Posted 08 Jun 2013 Link to this post

    Worked like a charm! I knew it would be simple.
Back to Top