Back to Devexpress

GridOptionsView.RowAutoHeight Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview.md

latest6.4 KB
Original Source

GridOptionsView.RowAutoHeight Property

Gets or sets whether the Data Grid automatically adjusts data row heights depending on cell content.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool RowAutoHeight { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property RowAutoHeight As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to change the data row height automatically; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to RowAutoHeight
GridView

.OptionsView .RowAutoHeight

|

Remarks

When cells display large text values or images, you can enable the RowAutoHeight feature to ensure that the cells display their contents completely.

The row auto height feature is supported when grid cells embed one of the following in-place editors:

If you disable the RowAutoHeight option, all data rows have the same height specified by the View’s GridView.RowHeight property.

Note

Advanced banded grid Views do not support automatic row height calculation, so the RowAutoHeight property is not in effect.

If the RowAutoHeight property is set to true , pixel-based vertical row scrolling is not available, even if the GridOptionsBehavior.AllowPixelScrolling property is forcibly set to True.

Important

The Auto Filter Row does not work if the Asynchronous Image Load and Auto Row Height options are enabled. Disable the Auto Row Height option.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RowAutoHeight property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-display-edit-rtf-data/CS/Form1.cs#L47

csharp
gridControl1.DataSource = CreateTable(20);
gridView1.OptionsView.RowAutoHeight = true;
gridView1.RowHeight = 30;

winforms-grid-bind-to-azure-sql-database/CS/DXApplication1/Main.cs#L9

csharp
gridView.OptionsView.RowAutoHeight = true;
}

winforms-grid-display-icons-in-data-cells/CS/Form1.cs#L88

csharp
this.gridView1.Name = "gridView1";
this.gridView1.OptionsView.RowAutoHeight = true;
this.gridView1.OptionsView.ShowGroupPanel = false;

winforms-grid-display-edit-rtf-data/VB/Form1.vb#L42

vb
gridControl1.DataSource = CreateTable(20)
gridView1.OptionsView.RowAutoHeight = True
gridView1.RowHeight = 30

winforms-grid-bind-to-azure-sql-database/VB/DXApplication1/Main.vb#L11

vb
gridView.OptionsView.RowAutoHeight = True
End Sub

winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L81

vb
gridView1.Name = "gridView1"
gridView1.OptionsView.RowAutoHeight = True
gridView1.OptionsView.ShowGroupPanel = False

See Also

RowHeight

CalcRowHeight

AllowRowSizing

Rows

GridOptionsView Class

GridOptionsView Members

DevExpress.XtraGrid.Views.Grid Namespace