|
|
|
|
|
- Overview
- Table or Looper control settings
- Implementation
- Events added
- Limitations
- Customizing the loading window or page
- "Add additional elements" event
- Populating the control at the top and/or bottom
- Programming
Infinite Table and Looper controls
There are two methods to populate Table and Looper controls programmatically: - Populating the entire control: All data present in the control is loaded when the control is initialized.
Advantage: All values are present in the control. You can sort and search the elements contained in the control. Disadvantage: The control and its data can use a significant amount of memory. In the case of mobile applications, this full loading mode can be slow and consume unnecessary bandwidth. - Populating the control if necessary (infinite Table and Looper): Only data visible to the user is loaded into memory. Additional data is loaded only if the user scrolls the view.
Advantage: Low memory usage. In the case of mobile applications, this means faster data visualization and lower bandwidth consumption. Disadvantage: No sort or search functionalities are available until all data is available.
Table or Looper control settings Implementation To choose how additional data will be displayed in infinite Table and Looper controls: - Open the control description window.
- On the "Content" tab, in the "Infinite table"/"Infinite looper" section:
- Choose the infinite table population mode:
 "Populate at the bottom": The data will be added automatically below the existing data. New in version 2025 "Populate at the top": Data will be added automatically at the top of the control, above existing data. "Call the process for adding elements when the user scrolls to the end": Data is added at the bottom. The data will be added automatically below the existing data.
- Select the internal window or page to be displayed when loading additional rows. You can:
- Use the default internal loading window or page,
- Use the preset window or page. If this option is selected, the WDAAF internal component is immediately added to the current project. Depending on the platform, the corresponding element (window or page) is automatically associated with the "Internal loading window" or "Internal loading page" option.
In WINDEV, the internal window is named "IW_AddExtraElem_WD". In WINDEV Mobile, the internal window is named "IW_AddExtraElem_WM". In WEBDEV, the page is named "IPAGE_AddExtraElem". Note: If the WDAAF component already exists, only the internal window or page is added to the component. - Use an internal window or page from your project.
- Specify the maximum number of rows: This is the maximum number of rows that can be added to the control. Once this number is reached, the "Add additional elements" event will no longer be called.
- Validate the control description window.
Events added The Table control or Infinite RepeatString setting has added: Limitations You cannot use the infinite data loading mode for: - Horizontal Looper, data-bound Looper and multi-column Looper controls.
- Data-bound Table controls.
Customizing the loading window or page The progress bar is contained in an internal window or page. "Add additional elements" event The "Add additional elements" event must contain the code for refreshing data in the control. By default, the internal loading window is displayed while running this code. At the end of code execution, the internal loading window will be automatically hidden. Note: This event is automatically called: - when initializing the window, if the control is empty.
- after the window initialization, if all the control rows are visible
- after the control is enlarged and all rows become visible.
- after scrolling down, if the last row is visible.
Note: If the default internal window is selected, a progress bar (loading window) is displayed while the "Add additional elements" event is executed. This progress bar will be displayed only if the main thread can be run while running the "Adding additional elements" event. To see the progress bar, you must run a long refresh process (HTTP request or HFSQL iteration, for example) in a thread run from the "Add additional elements" event. In this case, the progress bar must be managed using TableAddInProgress and LooperAddInProgress. Example of code for the "Add additional elements" event:
Fill in a Table control with the last unread emails: SessionID is int
EmailRead is Email
EmailReadFirst(SessionID, EmailRead, emailUnread)
WHILE NOT Email.Out
TableAddLine(TABLE_Email, EmailRead.Sender, EmailRead.ReceiveDate, EmailRead.MessageID)
EmailReadNext(SessionID, EmailRead, emailUnread)
END
Note: If the "Add additional elements" event returns False: - the internal loading window is no longer displayed,
- the "Add additional elements" event is no longer executed.
New in version 2025
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|