:: Forum >>
Thoughts on Paging
Hey Alex,
Don't want to rush anything but I could really use the paging functionality in the grid component. Right now I have a dataset that I would like to load into the grid but having more than 100 rows really kills the functionality.
I wanted to offer to assist you in developing this if you would like. I implemented paging in the grid component that I hacked together and the implementation was pretty easy.
In simplest form, it works like this:
Create a js array for storage (not display) that holds all of the records. Create another array for display that is built by looping through the master storage array for however many display rows there are currently selected.
Modify the sort function to sort on the master array and return a subset of data to the display array based on the current page and number of display rows selected. The same functionality works for search features.
Let me know if you would like help implementing it or if you would like to take a look at my old code. Would love to see these components integrated into your wonderful grid!
Aaron - aaron@x-clothing.com
Tuesday, February 3, 2004
I am not sure this approach will satisfy everyone - sometimes you need to load data asynchronously as well. However this is probably good start, so let's do it anyway (I will need some time as I quite busy with other things at the moment).
I will keep it as add-on/patch for some time not to break existing stuff.
Alex (ActiveWidgets)
Wednesday, February 4, 2004
Hi Aaron,
I've just released version 0.2.6 which contains simple patch implementing paging functionality very close to the way you described it. Tell me what you think. It is not complete - just first check if this approach makes sense at all.
(look at /patches/paging1.htm)
Alex (ActiveWidgets)
Monday, February 16, 2004
Just my 2 cents...
I need paging but it's because I have HUGE data sets. Our data sets can contain 1M+ records. When the time comes, I will be creating a paging system that will allow the grid to display 100 rows (using scrolling, not all visible at the same time) and have the last row be a link that when clicked will fetch from the server, another 100 rows and REPLACE the existing data set of the grid. I also have an external navigator that will also allow you to page from there as well. To me, this is true paging, not simply restricting the number of visible rows from your data set. In my opinion, if you are going through the trouble of returning a bunch of rows, why not let the user see them all.
BTW Alex, the paging1.htm demo has a bug in it in that if you hit the down arrow it will allow you to move the cursor outside the visible grids. I know this is a simple value change for the visible rows, but I thought you might like to know.
Jim Hunter
Wednesday, February 9, 2005
This topic is archived.
Back to support forum
Forum search