TreeList.ShowFilterPopupCheckedListBox Event
Fires before a pop-up filter menu is displayed. Allows you to customize the value checklist.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v24.2.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
#Declaration
[DXCategory("Behavior")]
public event FilterPopupCheckedListBoxEventHandler ShowFilterPopupCheckedListBox
#Event Data
The ShowFilterPopupCheckedListBox event's data class is DevExpress.XtraTreeList.FilterPopupCheckedListBoxEventArgs.
#Remarks
If the TreeListColumn.OptionsFilter.FilterPopupMode property is set to CheckedList, the pop-up filter menu contains a value checklist. You can handle the ShowFilterPopupCheckedListBox event to customize the checklist (for instance, disable or hide particular values).
#Example
The following example shows how to remove the “(Select All)” item from the Department Column’s Filter DropDown.
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;
}
}
}