OnLoadItems - cSelectionSource

Called to load items for paged data loading

Type: Event

Parameters: tSelectionItem[] ByRef aItems Boolean ByRef bLast String sFilter tSelectionItem prevItem Integer iPageSize Integer iPage

ParameterDescription
aItems (ByRef)Array to be filled with items
bLast (ByRef)Set to True to indicate that the end of the set has been reached
sFilterFilter string for loading suggestions
prevItemThe last item of the previous page
iPageSizeNumber of items expected
iPagePage number


Syntax
Procedure OnLoadItems tSelectionItem[] ByRef aItems Boolean ByRef bLast String sFilter tSelectionItem prevItem Integer iPageSize Integer iPage

Description

Called to load items for paged data loading (pbPaged is True) or for loading suggestions (pbSuggestions is True).

To implement paged data loading, the prevItem can be used as a reference point as it indicates the last item of the previous page. Alternatively, iPage can be used to determine which page needs to be returned, where for both cases iPageSize determines the page size.

For paged data loading, the bLast Boolean needs to be set to True if the last item is returned.

If pbPaged and pbSuggestions are both True, then the implementation must perform both filtering and paging where an empty string as sFilter indicates that the entire set is being loaded.

Note that for data-aware sources this event is also triggered, but then aItems and bLast are already filled.