All docs
V21.2
21.2
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

IRangeProvider.ValidateReference(String, ReferenceStyle) Method

Validates the cell reference in accordance with the specified cell reference style.

Namespace: DevExpress.Spreadsheet

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

Declaration

bool ValidateReference(
    string reference,
    ReferenceStyle style
)

Parameters

Name Type Description
reference String

A cell reference to be validated.

style ReferenceStyle

An enumeration member that specifies the cell reference style.

Returns

Type Description
Boolean

true, if the specified cell reference is valid; otherwise, false.

Remarks

The example below shows how to use the ValidateReference method to check whether the specified cell references are valid.

worksheet.Range.ValidateReference("A1:C4", ReferenceStyle.A1); // returns true
worksheet.Range.ValidateReference("R[-5]C[4]:R1C[-2]", ReferenceStyle.R1C1); // returns true
worksheet.Range.ValidateReference("A1:B1:C1", ReferenceStyle.A1); // returns false
worksheet.Range.ValidateReference("Sheet1!R12C7", ReferenceStyle.R1C1); // returns false
See Also