CellRange.Offset(Int32, Int32) Method
Returns a cell range that is a given number of rows and columns from the current range.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | The number of rows by which the cell range should be offset (positive value—range is offset down, negative value—range is offset up, zero—range is not offset vertically). |
column |
Int32 | The number of columns by which the cell range should be offset (positive value—range is offset to the right, negative value—range is offset to the left, zero—range is not offset horizontally). |
#Returns
Type | Description |
---|---|
Cell |
The cell range that is offset from the current range. |
#Remarks
Use the Offset
method to access a cell range that has the same size as the current range, but is moved from the current range by the specified number of rows and columns.
The Offset
method below returns a cell range that is five rows below and two columns to the left of the cell range “D3:F6”.
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Offset(Int32, Int32) method.
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.