Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

public static void AutoFitRows(
    this CellRange range
)

#Parameters

Name Type Description
range CellRange

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