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

Are Kendo DataSources able to handle data response sizes that differ from PageSize?

1 Answer 31 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 03 Oct 2013, 08:50 PM
We have noticed that dataSources can drop rows in a few scenarios.  After parsing the data from the server while it's inserting stuff into the dataSource._ranges[] array you can notice that not all of the rows that were received by dataSource:parse() and dataSource:data() are available in the ranges.

If the data response size is less than the pageSize() value then the grid has problems scrolling and paging, and upon scrolling, the dataSource() will continually request (page 1) and (page 2) over an over again.

If the data response size is larger than the pageSize() it might work, but we are unsure.  We have also noticed that if the data response size is 2x the pageSize() then we are more likely to have an issue with data finding it's way in the ranges.

The server is aggregating data from several services and it's hard to predict the number of records that will be returned. 

Should kendo support server responses that have more or less data than the page size suggests?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Oct 2013, 11:28 AM
Hi Justin,

The Kendo UI DataSource is designed to work with a predictable number of retrieved items when paging is enabled (except when returning less items on the last page). The total number of items can change, given that it is specified in the response and the Grid can find it out via the DataSource schema.

http://docs.kendoui.com/api/framework/datasource#configuration-schema.total

Furthermore, the Grid itself counts on having an expected number of items in each response when virtual scrolling is used.

On a side note, please do not post duplicate forum threads and support tickets, especially from different accounts. This is unlikely to bring any benefits, but can accidentally increase the load on our support staff and can make tracking and maintaining your support history difficult. In cases in which you want to receive answers from Telerik staff and the Telerik community, please use the forums. Thank you for understanding.

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