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

Classic Style

Overview

This menu contains:

  • a calendar for the date-time data type (see TreeListColumn.ColumnType);
  • a list (default) or check list for other data types.

TreeList_PopupFilterMenu_Classic

To specify a column’s menu mode, use the TreeListColumn.OptionsFilter.FilterPopupMode property (see TreeListOptionsColumnFilter.FilterPopupMode).


bcSalesDate.OptionsFilter.FilterPopupMode = FilterPopupMode.List;

Formatted Column Values: Filters Correspond to Actual Values or Displayed Text

Each filter in the menu corresponds to an actual value found in the column.

TreeListColumn_FilterMode_Regular

Using the TreeListColumn.Format property, you can format actual values. Instead of the actual values, the cells display formatted text. For instance, you can show only a four-digit year in date-time values.


bcSalesDate.Format.FormatType = Utils.FormatType.DateTime;
bcSalesDate.Format.FormatString = "yyyy";

When values are formatted, filters are also displayed according to the specified format. In certain cases, the format makes filters indistinguishable — they correspond to different values, but are displayed equally.

TreeListColumn_FilterMode_Regular_Formatted

To resolve this issue, set the TreeListColumn.FilterMode property to DisplayText.


bcSalesDate.FilterMode = XtraGrid.ColumnFilterMode.DisplayText;

In this mode, each filter corresponds to multiple actual values that have the same textual representation.

TreeListColumn_FilterMode_Display_Formatted