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

ISpreadsheetComponent.Unit Property

Gets or sets a unit of measure used in the workbook.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

DocumentUnit Unit { get; set; }

#Property Value

Type Description
DocumentUnit

The DocumentUnit enumeration member. It is expected to be set to the DocumentUnit.Document value by default.

Available values:

Name Description
Document

Specifies documents (one three-hundredths of an inch) as measurement units.

Inch

Specifies inches as measurement units.

Millimeter

Specifies millimeters as measurement units.

Centimeter

Specifies centimeters as measurement units.

Point

Specifies points as measurement units.

#Remarks

By default, all workbooks loaded in the SpreadsheetControl gets the unit of measurement from the SpreadsheetControl.Unit property value. To specify the unit of measurement for the workbook explicitly, use the SpreadsheetControl.Document.Unit notation.

When the unit of measurement is changed, the ISpreadsheetComponent.UnitChanging and ISpreadsheetComponent.UnitChanged events occur.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Unit 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.

See Also