Hey,
I am working with Kendo Grid with endless Scroll option set to true. I know that we are not suppose to have paging option (Refresh) with the endless or virtual scrolling set to true, that's why I am looking for a workaround that allows us at least to reset the Grid from the start (before scrolling).
here is an example: https://dojo.telerik.com/OZUTIJEz (Try to scroll and then hit the refresh icon)
There is always replicated/wrong data with wrong paging.
I have tried the following things and didn't work:
$('#grid').data('kendoGrid').dataSource.data([]);
$('#grid').data('kendoGrid').dataSource.read();
Any Ideas ?
Thanks.
8 Answers, 1 is accepted
Thank you for the example.
I tried it, but after I hit the refresh button the data is still correct.
https://www.screencast.com/t/MzmJziFcRQJ9
I assume I missed something, could you please share a short video of the issue and I will gladly assist further.
Regards,
Stefan
Progress Telerik

Hi Stefan,
Thank you for your response.
Please try this example: https://dojo.telerik.com/OZUTIJEz/2
Scroll drown to activate the infinite scroll functionality at least once. Then, try to hit the refresh button couple of times and check the scroll bar POSITION (with each refresh, the data will be added/duplicated but the number of total will be the same).
Regards,
Thank you for the clarifications.
I was able to observe it.
It seems that this occurs because clicking the refresh buttons is making a read request and the Grid with endless scrolling is treating this as a request for new data and keeps appending them.
I forward it to the developers' team to investigate if this is indeed an issue or a limitation due to the specifics of the endless scrolling.
I will let you know as soon as I receive the answer.
Thank you in advance for the patience.
Regards,
Stefan
Progress Telerik
I can confirm that this is an issue with the current version of Kendo UI Grid.
I created an issue in our GitHub repository and forwarded it to our developers for fixing. You can track its progress at:
https://github.com/telerik/kendo-ui-core/issues/4358
For now, there is no available workaround, if one is found it will be added in the GitHub issue for reference.
Additionally, I updated your Telerik points for bringing this to our attention.
Regards,
Stefan
Progress Telerik

Hey Stefan,
Many thanks for your time and help, glad that this has been taken into consideration
I have tried myself to find a workaround for it, and came up with this fix:
https://dojo.telerik.com/OZUTIJEz/4
Kind Regards,
El Mehdi
Thank you for sharing this with the Kendo UI community it is highly appreciated.
I added additional points for sharing this.
Regards,
Stefan
Progress Telerik

