Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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]Overview
   [Expand]Fundamentals
   [Collapse]Concepts
     Filtering
    [Expand]Layouts
    [Expand]Binding to Data
    [Collapse]Rows
     [Expand]Row Operations
      Row Class Structure
      Row Properties
      Category Rows
      Editor Rows
      Multi-Editor Rows
      Fixed Rows
    [Expand]Records
    [Expand]Cells
    [Expand]In-place Editors
     Formatting
    [Expand]Appearances
     Hit Information
    [Expand]Custom Painting
    [Expand]Alpha Blending and Background Images
    [Expand]Customization Form
     Batch Modifications
    [Expand]Drag and Drop
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Row Class Structure

The vertical grid controls (VGridControl and PropertyGridControl) arrange their data in rows. Available row types and their common features are described in the Rows Overview topic. This topic provides detailed information on the class structure of rows and their relation to other classes within a vertical grid control.

Expanded Row Class Structure

All rows used in the vertical grids have a number of common features. Rows are all arranged horizontally, they can all be moved and resized, can serve as parents for other rows, etc. Thus, all rows have the same ancestor - the BaseRow class which implements this common functionality. Note that this class is abstract and thus cannot be used directly.

The vertical grids have methods and properties that either return row objects or accept them as parameters. An example is the VGridControlBase.FocusedRow property that returns the currently focused row. Since a row of any type can be focused at a moment, this property returns an object of the BaseRow type. Other members operating on rows also use the BaseRow class as the return or parameter type. This allows you to handle rows of all types using the same property or method. Note that you may need to perform typecasts of such return values to use the functionality specific to each row type.

So, if you want to create your own row type, you need to derive it from the BaseRow class. However, if you want to take advantage of an existing row's functionality, you can use any BaseRow descendant as the ancestor for your row class.

The image below shows a class diagram of all the rows available within the vertical grid: CategoryRow, EditorRow and MultiEditorRow. The common ancestor for all these row types and a couple of possible descendant rows are also displayed in the image.

Row objects themselves store only common row settings. Settings specific to each row type are stored in separate objects that can be accessed via specially designed row properties. These specific settings depend on the data displayed by a particular row. If a row does not display any data (CategoryRow), it needs only settings that affect its header. Rows displaying a single cell in each record (EditorRow), need header settings and settings affecting displayed data - bound field name, format string, etc. If a row displays several cells in each record (MultiEditorRow), it needs several objects containing settings for each "item" (thus, it will have several captions, several bound fields, etc).

All objects containing row settings are descendants of the RowProperties class. Please refer to the Row Properties topic for details on these objects and the settings they provide.

The image below illustrates the relation between row objects and their setting objects.

When designing a new row class, you may wish to use a custom row properties object. In this case, you need to override the CreateRowPropertiesCore method of the base row class to return your own object. Note that the returned object must be a RowProperties class descendant.

Expanded See Also

How would you rate this topic?​​​​​​​