javascript - Refreshing KendoUI Grid - pager broken -


i have created simple kendo ui grid paging. want refresh grid new data. im using setdatasource attach new data grid , refresh refresh grid. works fine except pager stops working. give me no-items-in-the-grid message.

i created jsfiddle demonstrate mean:

http://jsfiddle.net/dxgyu/

and here code use refresh grid:

var grid = $("#grid").data("kendogrid"); var ds = setds(); grid.setdatasource(ds); grid.refresh(); 

in example wont changing data doesn't matter. if click button not refresh pager correct way , have no clue how pager update too. can me! it's small can't find anywhere how access grid pager.

thanks in advance.

the grid's .setdatasource() function expects actual kendo.data.datasource not object. change .setds() function return datasource:

function setds() {     return new kendo.data.datasource({         ...     }); } 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -