Back to Devexpress

RangeExtensions.AutoFitRows(CellRange) Method

officefileapi-devexpress-dot-spreadsheet-dot-rangeextensions-dot-autofitrows-x28-devexpress-dot-spreadsheet-dot-cellrange-x29.md

latest2.4 KB
Original Source

RangeExtensions.AutoFitRows(CellRange) Method

Adjusts the height of rows that comprise the cell range to accommodate the cell content of this range.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public static void AutoFitRows(
    this CellRange range
)
vb
<ExtensionAttribute>
Public Shared Sub AutoFitRows(
    range As CellRange
)

Parameters

NameTypeDescription
rangeCellRange

A CellRange object specifying the cell range comprising rows to be automatically resized.

|

Remarks

The AutoFitRows method is an extension method of the CellRange object that is called by using the instance method syntax.

The RowCollection.AutoFit and Row.AutoFit methods automatically adjust the row height to fit the cell content of entire rows.

To set row height values in required units of measurement, use the Row.Height or CellRange.RowHeight property (see the How to: Specify Row Height or Column Width example).

See Also

Rows and Columns in Spreadsheet Documents

RangeExtensions Class

RangeExtensions Members

DevExpress.Spreadsheet Namespace