BaseRow.Visible Property

Gets or sets a value indicating whether a row can be displayed within a vertical grid control.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
[DXCategory("Appearance")]
public bool Visible { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
<DXCategory("Appearance")>
Public Property Visible As Boolean

Property Value

Type Default Description
Boolean

true

true if a row can be displayed; otherwise, false.

Remarks

Use the Visible property to control row visibility.

If this property is true, a row is visible within the grid control if all its parent rows are expanded. Using the BaseRow.VisibleIndex property you can obtain the absolute position of the current visible row within the grid control.

If set to false, the row will not be displayed within the control. In this case, it is located within the Customization Form if its VGridOptionsRow.ShowInCustomizationForm option is enabled. If this option is disabled, the row is not displayed in the grid control or Customization Form. Note that for rows whose Visible property is false the BaseRow.VisibleIndex property returns -1.

When manipulating any row collection represented by a VGridRows object, you can use the VGridRows.FirstVisible and VGridRows.LastVisible properties to correspondingly obtain the first and last rows within the collection whose Visible property is true.

Examples

The following sample code iterates through the grid's collection of top level rows and makes visible all the hidden rows not displayed in the Customization Form. So rows are checked based upon the values of their BaseRow.Visible property and VGridOptionsRow.ShowInCustomizationForm option.

private void RestoreHiddenRows() {
    foreach (BaseRow row in vGridControl1.Rows) {
        if (!row.Visible && !row.OptionsRow.ShowInCustomizationForm) row.Visible = true;
    }
}
See Also