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

GridView Pager not updating when items added/deleted

2 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert Kaucher
Top achievements
Rank 2
Robert Kaucher asked on 05 Jun 2013, 04:44 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 07 Jun 2013, 06:56 AM
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!
0
Robert Kaucher
Top achievements
Rank 2
answered on 09 Jun 2013, 01:06 AM
Worked like a charm! I knew it would be simple.
Tags
Grid
Asked by
Robert Kaucher
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Robert Kaucher
Top achievements
Rank 2
Share this question
or