Skip to main content

TcxFilterValueItemKind Enum

Enumerates TcxFilterValueItem element types.

Declaration

TcxFilterValueItemKind = (
    fviAll,
    fviCustom,
    fviBlanks,
    fviNonBlanks,
    fviUser,
    fviValue,
    fviMRU,
    fviMRUSeparator,
    fviSpecial,
    fviUserEx
);

Members

Name
fviAll
fviCustom
fviBlanks
fviNonBlanks
fviUser
fviValue
fviMRU
fviMRUSeparator
fviSpecial
fviUserEx

Remarks

Options include:

Value

Description

fviAll

Selecting this element removes the filter conditions set for the corresponding item from the filter criteria. The fviAll element is always added to the list.

fviCustom

Selecting this element displays a filter dialog which allows end-users to visually define filter criteria. The fviCustom element is always added to the list.

fviBlanks

Applies the following filter condition:

ItemValue IS NULL

to an item. As a result, only records that contain NULL values in this item are selected. If the TcxFilterCriteria.Options property contains the fcoSoftNull flag, empty strings are considered as NULL and are also selected by this filter.

The fviBlanks element is added to the list only if the item contains a NULL value or an empty string (if TcxFilterCriteria.Options contains the fcoSoftNull flag).

fviNonBlanks

Applies a filter condition of the following type:

ItemValue IS NOT NULL

to an item. Only records that contain non-NULL values in this item are selected. If the TcxFilterCriteria.Options property contains the fcoSoftNull flag, empty strings are considered as NULL and are not selected by this filter.

The fviNonBlanks element is added to the list only if the item contains any non-NULL field or a non-empty string (if TcxFilterCriteria.Options contains the fcoSoftNull flag).

fviUser

Selecting this element fires the TcxCustomGridTableItem.OnUserFiltering event. You can handle this event to provide custom filter criteria.

In the image above, 'Filter TODAY' is the fviUser element.

You can add fviUser elements in a TcxDataFilterCriteria.OnGetValueList or TcxCustomGridTableItem.OnGetFilterValues event handler.

fviUserEx

This element fires the TcxCustomGridTableItem.OnUserFilteringEx event. You can handle this event to provide custom filter criteria for individual fviUserEx elements. Unlike fviUser elements, fviUserEx elements can be combined – more than one filter criteria that corresponds to a fviUserEx element can be simultaneously applied to the View. That’s why a filter dropdown displays check boxes for these elements in multi-selection mode.

You can add fviUserEx elements in a TcxDataFilterCriteria.OnGetValueList or TcxCustomGridTableItem.OnGetFilterValues event handler.

fviValue

Inserts a filter condition of the following type:

Item = 'SomeValue'

to the grid filter criteria. 'SomeValue' is a value of the element that a user selected. 'Item' identifies the item for which a user activates the dropdown list. This element’s value is defined by the TcxFilterValueItem.Value property. In the image above, '4/12/1988' and '4/17/1988' are the fviValue elements.

Unique values from the item are added to the list as fviValue elements. The total number of elements to load is specified by the TcxFilterCriteria.MaxValueListCount property. When working with a large dataset, consider using this property to limit the number of fviValue elements in the list. Another option is to prohibit loading fviValue elements to the list (refer to the TcxDataFilterValueList.Load method description).

fviMRU

This element corresponds to an item from the most recently used list (MRU list for short). By default, the MRU list is displayed at the top of the dropdown list. Most recently used items are divided from the rest of the elements by the fviMRUSeparator element.

In the image above, the top element ('4/12/1988') is the fviMRU element.

As with the fviValue element, selecting the fviMRU element inserts a filter condition based on the element’s value specified by the TcxFilterValueItem.Value property. Refer to the fviValue element description for more information.

fviMRUSeparator

This element separates the most recently used items (fviMRU elements) from the rest of the elements within the dropdown list.

Selecting the fviMRUSeparator element does nothing.

fviSpecial

This element is relevant only for items that display date/time values. Selecting the element adds a filter condition to determine whether values fall into a specific date range.

In the image above, 'Yesterday', 'Today', 'Tomorrow', '1988', …, '1996' are fviSpecial elements.

See Also