[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
  [Expand]Vertical Grid
  [Collapse]Property Grid
    Office View
    How to: Filter an object's properties using the CustomPropertyDescriptors event
    How to: Edit properties of multiple objects in a single PropertyGridControl
    How to: Sort properties using the CustomPropertyDescriptors event
  [Expand]Pivot Grid
  [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]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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Property Grid

The PropertyGridControl reveals an object's properties and allows you to modify them while the application is running.

Expanded Select an Inspected Object

To inspect and modify an object's settings, assign it to the PropertyGridControl.SelectedObject property.

At runtime, you can specify the SelectedObject in code to browse and modify any business object's settings. In the figure below, the LookUpEdit is bound to a list that contains records. Selecting a record fires the RepositoryItem.EditValueChanged event, which allows you to browse the selected Product.

Expanded Inspect Multiple Objects

You can use the PropertyGridControl.SelectedObject property to choose a single object whose properties you want to inspect, and the PropertyGridControl.SelectedObjects collection to access an array of inspected objects. In this case, the Property Grid control displays only those properties which apply to all objects in this array.

Expanded Filter Retrieved Rows

If you need to hide specific Property Grid rows, handle the PropertyGridControl.CustomPropertyDescriptors event. The following code illustrates how to hide a row generated for the "Price" data source field.

See also: How to: Filter an object's properties using the CustomPropertyDescriptors event | How to: Sort properties using the CustomPropertyDescriptors event

Expanded Customize Auto-Generated Rows

In the example above, all Property Grid rows are generated automatically based on the selected object type and properties. You can also create and modify rows manually. Rows are stored in the VGridControlBase.Rows collection and can be retrieved either from this collection by row indexes, or by calling the VGridControlBase.GetRowByFieldName method in code. The code below applies the currency formatting to auto-generated "Price" rows.

Expanded Manually Add Rows

Invoke the Property Grid smart tag and click "Run Designer". Switch to the Designer's "Rows" tab and click the "Add (EditorRow)" button to manually add a row.

These regular data rows are EditorRow class objects.


A control does not automatically create additional rows if a Property Grid contains at least one manually created data row.

Expanded Nested Rows

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

Related API

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

Expanded Populate Manually Created Rows

Rows you add manually display nothing at runtime. You can populate such rows in two different ways:

  • When you need rows with values not associated with SelectedObject properties, create unbound rows that derive from the System.ComponentModel.PropertyDescriptor class and handle the PropertyGridControl.CustomPropertyDescriptors event. See this example to learn more.

  • If manually added rows should display SelectedObject property values, assign these property names to row RowProperties.FieldName properties.

Expanded Multi-Editor Rows

Multi-editor rows (MultiEditorRow objects) combine multiple simple data rows into one row.

At design time you can create multi-editor rows in the Property Grid Designer.

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

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

Expanded Category Rows

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

To add categories at design time, 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

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

Expanded Fixed Rows

If a Property Grid control is too small to display all rows at once, it shows 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:


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

You can use the VGridControlBase.FixedTopRows and VGridControlBase.FixedBottomRows collections to retrieve fixed rows.

Expanded Find Panel

A Property Grid can display the Find Panel to help end-users locate the required settings by their names. To invoke this tool, press "Ctrl+F" at runtime.

Related API

Expanded See Also

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