TreeList.ShowCustomizationForm Event

Fires immediately after the Customization Form has been displayed.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v21.1.dll


public event EventHandler ShowCustomizationForm

Event Data

The ShowCustomizationForm event's data class is EventArgs.


Users can invoke the Customization Form via the Runtime Column Customization item of the column headers context menu. Note that this menu is only available when the TreeListOptionsMenu.EnableColumnMenu option is enabled.

You can invoke the Customization Form in code by calling the TreeList.ColumnsCustomization method.

The ShowCustomizationForm event enables you to perform specific actions each time the Customization Form is invoked either by an end-user or in code. This can be used in the following two cases:

  • You need to update other controls when the Customization Form appears. For instance, you may want to output instructions on how to use this form.
  • You need to change the look and feel of the Customization Form or adjust it in some other manner. In this case, the ShowCustomizationForm event must be handled since the form is recreated each time it is displayed. Thus, settings applied to it are not saved when closing the form and invoking it again. Note, that you must use the TreeList.CustomizationForm property to access the form settings.

Use the TreeList.HideCustomizationForm event to respond to the closing of the Customization Form.


The following sample code assigns a PopupMenu to the Tree List control’s Customization Form. The menu contains a single item that makes all hidden columns visible.

This example provides handlers for two events:

CustomizationForm - Clear

using DevExpress.XtraTreeList.Columns;

private void treeList1_ShowCustomizationForm(object sender, System.EventArgs e) {
    barManager1.SetPopupContextMenu(treeList1.CustomizationForm, popupMenu1);

private void btnDisplayAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
   foreach (TreeListColumn column in treeList1.Columns) {
      if (column.VisibleIndex == -1 && column.OptionsColumn.ShowInCustomizationForm) 
         column.VisibleIndex = treeList1.Columns.Count;
See Also