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

Generic Grid Refresh method

1 Answer 12 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Frans
Top achievements
Rank 1
Veteran
Iron
Frans asked on 16 Mar 2021, 10:13 AM

Hi,

I was wondering if there is a generic way to refresh the grid clientside, no matter if the grid uses paging or not.

This works:

    var grid = $('#' + gridId).data("kendoGrid");
    grid.dataSource.query({
        page: 1,
        pageSize: 10
    });

But that code is for paged grids only.

This code below also works, but doesnt set pageIndex to first page.
$('#ProductsGrid').data('kendoGrid').dataSource.read();

 

I was actually looking for something like a generic .refresh() function, which is also there, but doesnt work (anymore?).

 

Martin

 

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 19 Mar 2021, 06:59 AM

Hi Martin,

The page() method could be used with a non-pageable grid. You could pass the first page index:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/page

Is it possible for you to share more information on what is the exact functionality you are willing to achieve so that I can think of any alternatives?

 

Regards,
Tsvetomir
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/.

Tags
Grid
Asked by
Frans
Top achievements
Rank 1
Veteran
Iron
Answers by
Tsvetomir
Telerik team
Share this question
or