Skip to main content
A newer version of this page is available. .

ColumnViewOptionsFilter.ColumnFilterPopupMaxRecordsCount Property

Gets or sets the maximum number of records that are scanned to populate column filter dropdowns with unique filter values.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

[DefaultValue(-1)]
[XtraSerializableProperty]
public virtual int ColumnFilterPopupMaxRecordsCount { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value specifying the maximum number of records whose field values can be displayed within filter dropdowns.

Property Paths

You can access this nested property as listed below:

Object Type Path to ColumnFilterPopupMaxRecordsCount
AdvBandedGridView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
BandedGridView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
ColumnView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
CardView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
GridView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
LayoutView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
TileView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount
WinExplorerView
.OptionsFilter.ColumnFilterPopupMaxRecordsCount

Remarks

Filter dropdowns display unique column values that an end-user can select to filter against. The ColumnFilterPopupMaxRecordsCount property controls how many data source records are scanned for distinct values, which are then displayed within the dropdowns.

The default property value (-1) specifies that all the unique values in the column are displayed within filter dropdowns. Setting the ColumnFilterPopupMaxRecordsCount property to a positive integer limits the number of data source records that provide values. In this case, data rows are scanned starting from the first row up to the specified limit and values are added only once to the filter dropdowns. For instance, if the ColumnFilterPopupMaxRecordsCount property’s value is 3 and the first three records in the column contain the same value, the value will be added only once to this column’s filter dropdown.

When displaying a checked filter dropdown, first, a set of unique values is obtained by scanning records. The number of records scanned is specified by the ColumnFilterPopupMaxRecordsCount property. Then, the first items in this set are displayed in the filter dropdown. The maximum number of items displayed in the checked filter dropdown is limited by the ColumnViewOptionsFilter.MaxCheckedListItemCount property.

For greater control over filter dropdowns, handle the ColumnView.ShowFilterPopupListBox event for regular filter dropdown lists, and the ColumnView.ShowFilterPopupCheckedListBox event for checked filter dropdown lists.

See Also