0

question about the grid component

asked 2023-08-27 21:40:23 +0800

andij62 gravatar image andij62
315 1 7

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

delete flag offensive retag edit

Comments

Does anyone have an idea how to implement this with the grid?

andij62 ( 2023-09-05 18:43:29 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-09-07 23:32:22 +0800

MDuchemin gravatar image MDuchemin
2390 1 6
ZK Team

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2023-08-27 21:40:23 +0800

Seen: 4 times

Last updated: Sep 07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More