Skip to main content
A newer version of this page is available. .

PropertyGridControl.AutoGenerateRows Property

Gets or sets whether rows are automatically created in the control for all fields in the bound object.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v19.1.dll

Declaration

public bool AutoGenerateRows { get; set; }

Property Value

Type Description
Boolean

true if rows are automatically created in the control for all fields in the bound object; false if rows are only created when an object is assigned to an empty PropertyGridControl.

Remarks

Objects whose properties must be displayed within the PropertyGridControl can be bound to the control via the PropertyGridControl.SelectedObject or PropertyGridControl.SelectedObjects property.

The AutoGenerateRows property determines whether binding an object to the control or changing the browsable attribute collection automatically creates rows for the bound object’s fields. By default, rows are created for the fields marked with the BrowsableAttribute.Yes attribute. To specify attributes to be browsed, use the PropertyGridControl.BrowsableAttributes collection.

If the AutoGenerateRows property is set to false, and the object is assigned to an empty PropertyGridControl, rows are created automatically. If the object is assigned to a control which already contains rows in the VGridControlBase.Rows collection, new rows are not created. This is also the case if the browsable attribute collection is changed for a control which already contains rows. To refresh the collection of browsable properties manually, call the PropertyGridControl.RetrieveFields method.

If the AutoGenerateRows property is set to true, rows are automatically created every time an object is assigned to the control (regardless of whether the control already contains any row) or the browsable attribute collection is changed. Setting the AutoGenerateRows property to true is appropriate to display properties of multiple objects of different types during the application run.

Note

If compatibility mode is enabled, the AutoGenerateRows property’s default value is false; otherwise, true.

See Also