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

TreeList.ShowFilterPopupCheckedListBox Event

Allows you to customize checked Column’s Filter DropDown lists before they are displayed.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v18.2.dll

Declaration

[DXCategory("Behavior")]
public event FilterPopupCheckedListBoxEventHandler ShowFilterPopupCheckedListBox

Event Data

The ShowFilterPopupCheckedListBox event's data class is DevExpress.XtraTreeList.FilterPopupCheckedListBoxEventArgs.

Remarks

If the OptionsColumnFilter.FilterPopupMode property is set to CheckedList, the Column’s Filter DropDown is displayed as a checked list. In this mode, you can handle the ShowFilterPopupCheckedListBox event to customize the dropdown (for instance, disable or hide particlar items). This event is raised each time before the filter dropdown is displayed.

Example

The following example shows how to remove the “(Select All)” item from the Department Column’s Filter DropDown.

ShowFilterPopupCheckedListBox

using System;
using System.Windows.Forms;
using DevExpress.XtraTreeList;

namespace ShowFilterPopupCheckedListBox_example
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.table1TableAdapter.Fill(this.treelistdbDataSet.Table1);
        }

        private void treeList1_ShowFilterPopupCheckedListBox(object sender, FilterPopupCheckedListBoxEventArgs e)
        {
            if (e.Column.FieldName != "Department") return;
            // disable "(Select All)" item
            e.CheckedComboBox.SelectAllItemVisible = false;
        }
    }
}
See Also