Skip to main content
All docs
V24.2

TreeList.CustomizationFormSearch Event

Allows you to filter search results when a user searches in the Advanced Customization Form.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

Declaration

[DXCategory("Action")]
public event TreeListCustomizationFormSearchEventHandler CustomizationFormSearch

Event Data

The CustomizationFormSearch event's data class is DevExpress.XtraTreeList.TreeListCustomizationFormSearchEventArgs.

Remarks

The Customization Form integrates the search box that allows users to locate columns and bands by their captions. Handle the CustomizationFormSearch event to implement a custom search algorithm. This event fires for each item (column or band) in the Customization Form when a user enters text in the search box.

Advanced Customization Form - WinForms TreeList

The following example handles the CustomizationFormSearch event to display the child elements of a band in the Customization Form if the band matches the search string.

private void treeList1_CustomizationFormSearch(object sender, DevExpress.XtraTreeList.TreeListCustomizationFormSearchEventArgs e) {
    string bandCaption = e.OwnerBandCaption.ToLower();
    if(bandCaption.Contains(e.SearchText.ToLower()))
        e.Visible = true;
}
See Also