-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
in my projects i use the mvc pattern, grid and rowRenderer.
For a new project, the grid should behave differently than is currently possible. For example, 20 rows should be displayed. After the grid there should be a button "Show next 20 items". If the user clicks the button, another 20 elements should be displayed, i.e. 40 elements. If the user clicks the button again, 60 elements should be displayed. The grid must therefore expand continuously downwards. How could I implement this?
Greetings Andi
Hey there,
The simplest solution would be to have 2 different model objects: a full model, and a truncated model.
When you load initial, simply load items 0 to 19 into the truncated model, and have either a button below the grid, or in a grid foot to load more items.
Every event you would simply pull more items from the full model and add them to the truncated model.
See a basic version of that here: https://zkfiddle.org/sample/26a4dkp/2-grid-load-more-rows
Asked: 2023-08-27 21:40:23 +0800
Seen: 4 times
Last updated: Sep 07
Does anyone have an idea how to implement this with the grid?
andij62 ( 2023-09-05 18:43:29 +0800 )edit