Listbox

The data table. It shows a selection of records in columns, with sorting, search, paging, row selection and per-column events. It is the richest block of the component — enough to have its own page in the mechanisms section.

What it is

Typelistbox
Categoryothers
Children allowed0
Styling targetsbspk
EventsonSelect, onSelectRows, onDoubleClick

The settings

Only the settings specific to this block are listed here. The block name, HTML id, anchor, conditional display and repetition are shared by every block and described once, under Shared settings.

Parameters

SettingHow it is setWhat it doesSpecifics
First request
vt_FirstRequest
text (text)4D expression evaluated on first load to build the list — e.g. ds.MY_TABLE.query(…). Empty with a table selected, the listbox takes every record. With no table, the expression must return a collection.accepts 4D
Custom sort
vt_FunctionSort
text (text)Replaces the standard sort when a column header is clicked. Careful: it also runs on first load, where This.vo_POST.sortableColumn is empty — handle that case, otherwise the expression fails and the list stays empty.accepts 4D
Relationship path
vt_RelatedEntities
text (text)4D expression providing the list directly — e.g. vo_selectedItemData.Entity.MyLines. If a first request shaped like ds.….query(…) is also set, the two are combined. Handle the 'nothing selected' case.accepts 4D
Table
vt_TableName
select (text)—HTML attribute

Search zone

SettingHow it is setWhat it doesSpecifics
Search only with my function
vb_OnlyUseMySeachFunction
toggle (boolean)—default: no
Hide listbox on startup
vb_hideListboxAtStart
toggle (boolean)—default: no
Search function
vt_SearchFunction
text (text)Receives the current selection and the entered values, and returns the filtered selection — e.g. ds.MY_TABLE.mySearch(This.Selection; This.vo_POST). Left empty, a generic filter matches each search field against the field of the same name.accepts 4D
Block hidden when listbox is displayed
vt_WrapperReplaceHiddenListbox
select (text)—
Search container
vt_searchwrapper
select (text)Container block (container, accordion or modal) holding the search fields. Each field is identified by its name, which is what the search function reads back. With no container set, typing filters nothing.HTML attribute

Display columns parameters

SettingHow it is setWhat it doesSpecifics
Table with the fields to be displayed
vc_FieldDisplay
columnList (collection)—
Dynamic columns
vt_DynamicColumnsFunction
text (text)Receives the column collection and returns it modified — to build columns only known at runtime, one per language for instance. Short form accepted: Class.myFunction.accepts 4D

Display properties

SettingHow it is setWhat it doesSpecifics
Allow multiple selection
vb_DisplayCheckbox
toggle (boolean)—default: yes
Display Headers
vb_DisplayHead
toggle (boolean)—default: yes
Show the counter
vb_DisplayResults
toggle (boolean)Shows the counter above the list: 'Total: N results', and 'N results out of M' as soon as a search filters.default: yes
Number of lines to display
vl_DisplayLine
number (integer)—default: 0
Items per load
vl_LengthByPage
number (integer)Size of one batch loaded at a time, not the number of visible rows. A first batch loads up front, the next ones as you scroll — or page by page in Pagination mode.HTML attribute, default: 0
Minimum number of lines to display
vl_MinDisplayLine
number (integer)—default: 0
Display condition
vt_ConditionDisplayCheckbox
text (text)4D expression evaluated on every render: the boxes appear only if it returns true. If it fails or returns anything other than a boolean, the boxes stay visible.accepts 4D
Display type
vt_DisplayListboxType
checkbox (enum)Free height: the list stretches. Fixed height: fixed size and the list scrolls. Pagination: page-by-page navigation. To the bottom of the screen: the list fills the space left below it.HTML attribute

Display lines properties

SettingHow it is setWhat it doesSpecifics
Even row color
vt_EvenColor
color (text)—
Hover color
vt_HoverRowBackgroundColor
color (text)—
Text hover color
vt_HoverRowTextColor
color (text)—
Odd row color
vt_OddColor
color (text)—
Selected row background color
vt_SelectedRowBackgroundColor
color (text)—
Selected row text color
vt_SelectedRowTextColor
color (text)—

Card mode

SettingHow it is setWhat it doesSpecifics
Gap between cards
vl_CardGap
number (integer)Space between cards, in pixels, both horizontally and vertically. Empty: 12 px.
Cards per row
vl_CardsPerRow
number (integer)How many cards are shown side by side in the list once the display switches to cards. Empty or 1: one card per row.
Field columns inside the card
vl_TemplateColumns
number (integer)Layout of the fields INSIDE a card: how many columns to spread them over. Empty or 1: fields are stacked.
Switch to card below :
vt_BreakPointCard
select (enum)—
Field label position
vt_CardLabelLayout
select (enum)Inside a card, put the column label above its value or on the same line.default: column

The tables on this page are produced automatically from the block's schema. If this page and the panel disagree, the schema is right.