[Expand]General Information
[Collapse]WinForms Controls
  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
    [Collapse]Rows
      Scrolling and Focusing Rows
      Using the Rows Iterator
      Expanding and Collapsing Rows
    [Expand]Records
    [Expand]Cells
    [Expand]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]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]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]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Rows

Expanded Automatic Row Generation

You can run the application to browse and edit data immediately after the Vertical Grid is bound to a data source since all rows are generated automatically. For code-first data sources (for example, Entity Framework models), you can mark a property with the Display attribute and disable its AutoGenerateField parameter to skip generating a column for this property. The "Display" attribute in the code below prevents a Vertical Grid from generating an "Additional Info" column.

You can utilize other attributes to re-arrange columns, modify header captions, change their default in-place editors, etc. Refer to the Data Annotation Attributes article to learn more.

The Vertical Grid does not automatically re-generate columns if you replaced a previous data source with a new one; you need to do it manually by invoking the Vertical Grid Designer and clicking the "Retrieve Fields" button within the "Rows" tab. You can also do this to restore the initial Grid state.

To do the same in code, call the VGridControlBase.RetrieveFields method either directly after changing a data source, or on the VGridControlBase.DataSourceChanged event.

Expanded Base Row Settings

The list below enumerates base row settings that you may need to modify.

Expanded Add and Remove Rows Manually

Rows associated with data fields declared in a data source are called bound rows. To add such rows manually, invoke the Designer, switch to the "Rows" tab and click the "Add (EditorRow)" button. Use the Property Grid to assign a data source field name to the newly created row's RowProperties.FieldName property. Otherwise, the row is unbound and receives no data from the data source.

To remove a row, use the "Remove Column" designer button.

Regular data rows are EditorRow class objects.

Expanded Nested Rows

In the Designer "Row" tab, drag one row onto another to create a row hierarchy.

Related API

To move a child row from its parent back to the top level, drag-and-drop it while pressing the "Ctrl" key.

To created nested rows in code, place new rows inside existing rows' BaseRow.ChildRows collection. If you need to categorize existing rows instead, call the VGridControlBase.MoveRow method.

The sample below illustrates how to implement the "Shift+Up" and "Shift+Down" hotkeys that make a currently focused row an upper row's child or a lower row's parent.

Expanded Multi-Editor Rows

Multi-editor rows (MultiEditorRow objects) combine multiple simple data rows into one, using a more compact layout to display data.

Use the Grid Designer to add multi-editor rows.

To populate your multi-editor row, modify the MultiEditorRow.PropertiesCollection. Each collection item represents a regular EditRow with standard settings - Caption, FieldName, etc.

The following sample illustrates how to add a multi-editor row in code:

Vertical dashes separate individual value and header cells by default. You can replace these dashes with a custom string by changing the MultiEditorRow.SeparatorKind to String and specifying the MultiEditorRow.SeparatorString property. In the figure below an "x" character serves as a custom separator.

Expanded Category Rows

Category rows allow you to organize multiple data rows into a group and provide a caption for it.

To add categories, go to the Designer "Rows" tab and use the "Add" button's drop-down menu. Then drag-and-drop regular data rows onto this category to populate it.

Related API

The CategoryRow class instances represent categories in code. The following sample illustrates how to add a category:

Expanded Hide Horizontal Row Borders

You can hide Vertical Grid's horizontal and vertical lines by disabling the BaseOptionsView.ShowHorzLines and BaseOptionsView.ShowVertLines settings.

Expanded Fixed Rows

If a Vertical Grid control is too small to display all rows at once, it deploys a vertical scrollbar. Rows can anchor to the control's top or bottom edge and remain visible as users scroll through records. To make a row fixed, specify its BaseRow.Fixed property. In the following animation, the "Appearance" category is anchored to the control's top.

Important

The BaseRow.Fixed property is in effect only for the top-tier rows. If a row is another row's child or belongs to a category, it cannot be anchored. As an alternative, specify the Fixed property for the parent row.

To retrieve fixed rows, access the VGridControlBase.FixedTopRows and VGridControlBase.FixedBottomRows collections.

Expanded Identify and Access Grid Rows in Code

Use the following API to retrieve specific rows:

Expanded See Also

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