Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

#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