windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-gridcell-cc04f6f7.md
Gets the handle of the row which owns the cell.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public int RowHandle { get; }
Public ReadOnly Property RowHandle As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value which specifies the handle of the row which owns the cell.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the RowHandle 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.
winforms-grid-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L53
sourceGridCell = new GridCell(gridHI.RowHandle, gridHI.Column);
lastMouseDownMoveCell = new GridCell(sourceGridCell.RowHandle, sourceGridCell.Column);
}
{
object value = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column);
GridCell[] selectedCells = View.GetSelectedCells();
winforms-grid-customize-cell-color/CS/CellColorHelper.cs#L51
colors[cell] = value;
_View.RefreshRowCell(cell.RowHandle, cell.Column);
}
winforms-grid-multi-cell-editing/CS/MultiSelectionEditingHelper.cs#L63
foreach(GridCell cell in cells) {
int rowHandle = cell.RowHandle;
GridColumn column = cell.Column;
winforms-grid-draw-thick-cell-border-directx/CS/Form1.cs#L72
GridViewInfo info = _View.GetViewInfo() as GridViewInfo;
GridCellInfo cellInfo = info.GetGridCellInfo(cell.RowHandle, cell.Column);
return cellInfo.Bounds;
winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L49
sourceGridCell = New GridCell(gridHI.RowHandle, gridHI.Column)
lastMouseDownMoveCell = New GridCell(sourceGridCell.RowHandle, sourceGridCell.Column)
End If
Private Sub CopyCellsValues()
Dim value As Object = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column)
Dim selectedCells() As GridCell = View.GetSelectedCells()
winforms-grid-customize-cell-color/VB/CellColorHelper.vb#L42
colors(cell) = value
_View.RefreshRowCell(cell.RowHandle, cell.Column)
End Sub
winforms-grid-multi-cell-editing/VB/MultiSelectionEditingHelper.vb#L56
For Each cell As GridCell In cells
Dim rowHandle As Integer = cell.RowHandle
Dim column As GridColumn = cell.Column
winforms-grid-draw-thick-cell-border-directx/VB/Form1.vb#L68
Dim info As GridViewInfo = TryCast(_View.GetViewInfo(), GridViewInfo)
Dim cellInfo As GridCellInfo = info.GetGridCellInfo(cell.RowHandle, cell.Column)
Return cellInfo.Bounds
See Also