Need More Info
Last Updated: 13 Mar 2023 10:43 by ADMIN
detlef
Created on: 06 Mar 2023 12:31
Category: Kendo UI for jQuery
Type: Feature Request
0
Refresh the grid when using local array with data

Refresh the grid with a function. I now do a queryselector to find and click the refresh button that i only added so i can refresh the grid with javascript. I'm using an array (global scope) to store data.

The grid.refresh() didn't work, probably because i don't use transport. I have tried all the solutions on telerik and stackoverflow websites.

The data in the array gets manipulated outside of the kendo grid. document.queryselector(".k-pager-refresh").click() option works , but there has got to be a better way to do this.

P.s. deleting and rebuilding the grid with the new data gives bugs with grouping the data by column header, so that isn't an option.

1 comment
ADMIN
Neli
Posted on: 13 Mar 2023 10:43

Hello,

As far as I understand from the provided information you need to refresh the data of a Grid bound to a local data source, but the refresh method does not take effect. 

Even though the Grid is bound to a local dataSource the refresh method should render the new items. This is demonstrated in the Dojo linked here.

You could also try to use the setDataSource method if it is suitable for in your scenario:

- https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/setdatasource

Changing the items using the setDataSource method is demonstrated in the Dojo example linked here.

I will appreciate it if you could provide more details about the exact implementation on your side, so we could understand the scenario better. It will be very helpful if you could prepare and send us a Dojo example where the behavior is demonstrated, so we could provide appropriate assistance. If it is more easier for you you could modify the Dojo examples linked above.

Until we clarify the exact scenario I will change the status of the item to 'Need more info'

Looking forward to your reply.

Regards,


Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.