wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-dot-getrow-x28-system-dot-int32-x29.md
Returns a row object that corresponds to the specified row handle.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public object GetRow(
int rowHandle
)
Public Function GetRow(
rowHandle As Integer
) As Object
| Name | Type | Description |
|---|---|---|
| rowHandle | Int32 |
An integer value that specifies the row’s handle.
|
| Type | Description |
|---|---|
| Object |
An object that corresponds to the specified row handle.
|
To obtain a row object that corresponds to a row with the specified handle, use the GetRow method. Row objects represent records in a data source. For instance, a DataRow object represents a record in a DataTable.
To learn more, see Obtaining Row Handles and Identifying Rows and Cards.
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetRow(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.
wpf-grid-highlight-specific-cells/CS/MainWindow.xaml.cs#L13
ObservableCollection<HighlightedGridCell> cellsToHiglight = new ObservableCollection<HighlightedGridCell>();
cellsToHiglight.Add(new HighlightedGridCell(gridControl1.GetRow(0), gridControl1.Columns["ID"], Colors.Red));
CellsHighlightHelper.SetCellsToHighlight(gridControl1, cellsToHiglight);
wpf-data-grid-obtain-rows-visible-on-screen/CS/IScrollInfoSample/Window1.xaml.cs#L31
continue;
var item = grid.GetRow(handle) as Item;
if (item == null)
wpf-grid-highlight-specific-cells/VB/MainWindow.xaml.vb#L14
Dim cellsToHiglight As New ObservableCollection(Of HighlightedGridCell)()
cellsToHiglight.Add(New HighlightedGridCell(gridControl1.GetRow(0), gridControl1.Columns("ID"), Colors.Red))
CellsHighlightHelper.SetCellsToHighlight(gridControl1, cellsToHiglight)
wpf-data-grid-obtain-rows-visible-on-screen/VB/IScrollInfoSample/Window1.xaml.vb#L31
If Not Me.grid.IsValidRowHandle(handle) Then Continue For
Dim item = TryCast(Me.grid.GetRow(handle), Item)
If item Is Nothing Then
See Also