officefileapi-devexpress-dot-spreadsheet-dot-rowcollection-dot-item-x28-system-dot-string-x29.md
Provides access to individual rows in the collection by their headings.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
Row this[string rowHeading] { get; }
ReadOnly Property Item(rowHeading As String) As Row
| Name | Type | Description |
|---|---|---|
| rowHeading | String |
A string that specifies the heading of the row to be obtained (for example, “1”, “2”, “3”, etc.). This value matches the value of the row’s Row.Heading property.
|
| Type | Description |
|---|---|
| Row |
A Row object that is a row with the specified heading.
|
Use the Item property to access individual rows by their headings, which are displayed at the left of the worksheet.
This example demonstrates how to access rows in a worksheet. Use the Worksheet.Rows property to get a collection of rows contained in a worksheet (the RowCollection object). To get an individual row by its index (zero-based) or heading (“1”, “2”, “3”, etc.), use the RowCollection.Item property.
using DevExpress.Spreadsheet;
// ...
IWorkbook workbook = spreadsheetControl1.Document;
// Access a collection of rows.
RowCollection rows = workbook.Worksheets[0].Rows;
// Access the first row by its index in the collection of rows.
Row firstRow_byIndex = rows[0];
// Access the first row by its unique name.
Row firstRow_byName = rows["1"];
Imports DevExpress.Spreadsheet
' ...
Dim workbook As IWorkbook = spreadsheetControl1.Document
' Access a collection of rows.
Dim rows As RowCollection = workbook.Worksheets(0).Rows
' Access the first row by its index in the collection of rows.
Dim firstRow_byIndex As Row = rows(0)
' Access the first row by its unique name.
Dim firstRow_byName As Row = rows("1")
See Also