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.v20.1.dll

Declaration

public bool AutoGenerateRows { get; set; }
Public Property AutoGenerateRows As Boolean

Property Value

Type Description
Boolean

true, if the control automatically re-creates rows when you re-bind an object; false, if the control automatically creates rows only when you bind an object for the first time.

Remarks

The SelectedObject and SelectedObjects properties allow you to specify the object(s) whose properties are displayed in the control.

propertyGridControl1.SelectedObject = myObject1;

The control displays properties annotated with the Browsable attribute set to Yes.

[Browsable(true)]
public int MyProperty { get; set; }

Use the BrowsableAttributes collection to enable the control to show properties annotated with a specific attribute. The code below enables the control to show properties annotated with the Browsable attribute set to No.

propertyGridControl1.BrowsableAttributes = new AttributeCollection(new Attribute[] { BrowsableAttribute.No });

The AutoGenerateRows property specifies whether the control automatically re-creates rows (see the Rows collection) when you re-bind an object or change the attribute collection. If this property is enabled, you can display multiple different-type objects during the application run.

If this property is set to false, the control automatically creates rows only when you bind an object for the first time. To create rows manually when you re-bind an object or change the attribute collection, call the RetrieveFields method.

NOTE

Since version 17.1, the default value is true. If the static (Shared in VB) WindowsFormsSettings.DefaultSettingsCompatibilityMode property is set to v16, the default value is false. See Version Compatibility: Default Property Values for more information.

See Also