[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [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
    [Expand]Rows
    [Expand]Records
    [Expand]Cells
     Customization Form
     Data Layout: Records, Rows, and Cells
   [Expand]Layouts
   [Expand]Data Editing and Validation
    Filtering
    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]Examples
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [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]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Customization Form

Expanded Overview

The vertical grid provides Customization form that allows users to hide grid rows and create/remove row categories. Click Row Chooser in a row's context menu to invoke the form.

Expanded Options

Form

The VGridCustomizationForm class represents the form. The VGridControlBase.ShowCustomizationForm event fires before the form is shown and allows you to customize it. Use the VGridControlBase.CustomizationForm property to access the form when it is displayed onscreen. When the form is not shown, this property returns null.

The example below shows how to specify the form's caption, width, border style and icon as in the following figure.

Rows

Set the VGridOptionsRow.AllowMoveToCustomizationForm property to false to prohibit users to move the row to Customization form.

Note

The VGridOptionsRow.AllowMove and VGridOptionsBehavior.DragRowHeaders options do not affect the capability to move the row to Customization form.

If you use the BaseRow.Visible or BaseRow.VisibleIndex property to hide a row in code, you can also set the VGridOptionsRow.ShowInCustomizationForm property to false to hide it in Customization form.

Categories

New... and Delete buttons in Categories tab allow users to create and delete row categories in Customization form.

The VGridControlBase.CustomizationFormCreatingCategory and VGridControlBase.CustomizationFormDeletingCategory events fire before a category created/deleted. You can handle these events to prevent a category from being created/deleted, customize its caption, etc.

When a user deletes a category, its rows are also deleted. The VGridOptionsBehavior.PreserveChildRows property allows you to preserve the rows, and delete the category only. The preserved rows move to the root level.

How to validate a new category's caption

When users create a new category, they enter the category's caption. The example below shows how to check whether a category with the same caption already exists in the grid. If the captions match, the code shows a warning message.

The code enumerates the grid's categories to compare their captions with the new category's caption. See Tree Traversal for more information on how to enumerate the grid's rows.

Expanded How to Show/Hide the Form in Code

Call the VGridControlBase.RowsCustomization method to show Customization form. The form is shown at the grid's bottom right. Use the screenLocation parameter to specify where to show the form. The VGridControlBase.ShowCustomizationForm event fires before the form is shown.

To close the form, call the VGridControlBase.DestroyCustomization method. This method sets the VGridControlBase.CustomizationForm property to null. The VGridControlBase.HideCustomizationForm event fires before the form is closed.

The following code shows how to display/hide Customization form depending on whether it is already hidden/displayed.

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