Skip to main content

TcxDataFilterValueList.Load(Integer,Boolean,Boolean,Boolean) Method

Populates a list of values for filter conditions.

Declaration

procedure Load(AItemIndex: Integer; AInitSortByDisplayText: Boolean = True; AUseFilteredValues: Boolean = False; AAddValueItems: Boolean = True); overload; virtual;

Parameters

Name Type
AItemIndex Integer
AInitSortByDisplayText Boolean
AUseFilteredValues Boolean
AAddValueItems Boolean

Remarks

This method adds elements of different types to the list. The first items added are always fviAll and fviCustom elements. Then the method adds unique values from the table item whose index is defined by the AItemIndex parameter. Values are added as fviValue elements. If an item contains any NULL values, then this method also adds fviBlanks and fviNonBlanks elements. Then, the Load method fires the TcxDataFilterCriteria.OnGetValueList event, which enables you to customize the generated list. For instance, you can add and/or delete specific elements, and add user-defined elements (fviUser and fviUserEx).

The AInitSortByDisplayText parameter specifies whether filter items in the list are ordered by the display text or by value (see the SortByDisplayText property). Pass True as the AInitSortByDisplayText parameter to sort items by the display text.

The AUseFilteredValues parameter specifies whether all values (fviValue elements) or only those that were used prior to the call, are added to the list. Pass True as the AUseFilteredValues parameter to only add fviValue elements from the previously used filter.

The AAddValueItems parameter specifies whether values (fviValue elements) are added to the list. When the list is populated with values from a large dataset, obtaining these values may take time. To improve performance, pass False as the AAddValueItems parameter to prohibit adding fviValue elements to the list. You can always manually extend the list with required values by handling the TcxDataFilterCriteria.OnGetValueList event.

See Also