jquery - Can slickgrid page and display json -


we want load several thousand records client when page requested , have first 25 records displayed. user should able page through records or resort list column or filter data in various columns. we're opting load data client in 1 lump sum because we'd rather have heavier load in page request , faster performance when viewing or editing data after. can't see example paging on slickgrid site. slickgrid have paging baked in or lightweight i'd have implement myself? have links or examples share give me headstart?

the data we'll using json data.

i've been coding slickgrid week , found had write sort , filter code myself. looking through source, don't see indicates paging built in. you'll spend amount of time writing code it, seems worth it.

i loaded 30,000 rows of data using ajax/json , loads , sorts in less 1 second. don't know if help, method call load grid. sorts on client , filters on server:

$.getjson(baseurl + '/_getnewhires?filter=' + filter, function (data) {     grid = new slick.grid($("#newhiresgrid"), data, columns, options);      grid.onsort = function (sortcol, sortasc) {         sortdir = sortasc ? 1 : -1;         sortcol = sortcol.field;          if (sortasc == true)             data.sort(compare);         else             data.reverse(compare);          grid.render();     }; }); 

when sort method called, array bound grid (data) rearranged, , grid reloaded using .render() method. in order page, you'll have have array of data, , array of displayed data.

he have example of paging here, being javascript amateur am, it's difficult me follow.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -