-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I am using a own pagination in a grid component and I would like to know how can I make the pageSize update automatically based on the number of records being displayed on the screen? Because until I perfom an action in the screen the pageSize isn’t updated. The code I am using is the following:
Zul:
Java controller:
Here I have the method that is executed with the AfterCompose event, where I indicate the pageSize that the pagination will have, which will be the one that the grid has, by default 20.
When we load the page it shows us the pageSize with 20 records, however, if we count the records we see that there are 19.
Instead, if you change the page it is automatically updated to the number of records that fit on the screen:
I saw you have specified autopaging="true" and vflex="true", Grid will determine its page size automatically according to available height. Hence, you can't change the page size by setPageSize()
.
You mentioned:
how can I make the pageSize update automatically based on the number of records being displayed on the screen?
As I understand, what you want is exactly what autopaging="true" does. You need to change the height to change the number of records to display.
Asked: 2022-04-20 18:48:39 +0800
Seen: 13 times
Last updated: May 16 '22
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver