[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Collapse]Vertical Grid
   [Expand]Binding to Data
   [Collapse]Data Layout: Records, Rows and Cells
    [Collapse]Customization Form
      Using the Customization Form
     Data Layout: Records, Rows, and Cells
   [Expand]Data Editing and Validation
    Formatting Values
   [Expand]Drag and Drop
   [Expand]Appearance and Custom Painting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Hit Information
    Batch Modifications
   [Expand]Member Tables
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Using the Customization Form

This topic describes how to use the Customization Form at runtime. It provides information on showing and hiding the Customization Form, and describes how to access the Customization Form's settings.

Expanded Showing and Hiding the Customization Form

In order to give end-users the ability to temporarily hide specific grid rows at runtime, the Customization Form should be invoked. You can use the VGridControlBase.RowsCustomization method for this purpose. This method has two overloaded variants - with and without a parameter specifying the form's onscreen position.

  • The RowsCustomization method, when called without parameters, creates an instance of the VGridCustomizationForm object. When called for the first time, the RowsCustomization method displays the Customization Form at the control's bottom right corner.

    Subsequent calls to this method will display the form at the position where it was closed.

  • The RowsCustomization method to which the screenLocation parameter is passed creates the Customization Form, and displays it onscreen at the position specified by this parameter. The location is specified in the screen coordinates.

After being invoked, the Customization Form can be hidden via the VGridControlBase.DestroyCustomization method. This method destroys the VGridCustomizationForm object instance and sets the VGridControlBase.CustomizationForm property of the grid control to null.

The following code handles a button's Click event to show the Customization Form (if the Form does not exist) and destroys the form (if it is visible):

Each time the Customization Form is created, the VGridControlBase.ShowCustomizationForm event fires. Hiding the Customization Form raises the VGridControlBase.HideCustomizationForm event. The following code provides handlers for these events to change the button name depending on Customization Form visibility.

Expanded Accessing the Customization Form

After the Customization Form has been displayed, it can be accessed from the grid control's VGridControlBase.CustomizationForm property. The Customization Form is represented by an instance of the VGridCustomizationForm object, which is a System.Windows.Forms.Form class descendant. The Customization Form can be adjusted in the same way as a regular form. For instance, you can change the caption and border type of this form, assign a context menu to it, etc. However, note that the Customization Form is recreated each time it is invoked. Thus, changes can be applied to it only when it is visible, and these changes are not saved after it is closed. Handle the VGridControlBase.ShowCustomizationForm event to apply the desired changes each time the form is invoked.

The following code handles the VGridControlBase.ShowCustomizationForm event to modify the caption, border type and width of the Customization Form, and assign a specific icon to it.

The Customization Form now has the following appearance each time it is invoked.

Is this topic helpful?​​​​​​​