Back to Devexpress

GridCell.RowHandle Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-gridcell-cc04f6f7.md

latest5.6 KB
Original Source

GridCell.RowHandle Property

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

Declaration

csharp
public int RowHandle { get; }
vb
Public ReadOnly Property RowHandle As Integer

Property Value

TypeDescription
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

csharp
sourceGridCell = new GridCell(gridHI.RowHandle, gridHI.Column);
    lastMouseDownMoveCell = new GridCell(sourceGridCell.RowHandle, sourceGridCell.Column);
}

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/CS/Classes/DragCellsValuesHelper.cs#L83

csharp
{
    object value = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column);
    GridCell[] selectedCells = View.GetSelectedCells();

winforms-grid-customize-cell-color/CS/CellColorHelper.cs#L51

csharp
colors[cell] = value;
    _View.RefreshRowCell(cell.RowHandle, cell.Column);
}

winforms-grid-multi-cell-editing/CS/MultiSelectionEditingHelper.cs#L63

csharp
foreach(GridCell cell in cells) {
    int rowHandle = cell.RowHandle;
    GridColumn column = cell.Column;

winforms-grid-draw-thick-cell-border-directx/CS/Form1.cs#L72

csharp
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

vb
sourceGridCell = New GridCell(gridHI.RowHandle, gridHI.Column)
    lastMouseDownMoveCell = New GridCell(sourceGridCell.RowHandle, sourceGridCell.Column)
End If

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/VB/Classes/DragCellsValuesHelper.vb#L80

vb
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

vb
colors(cell) = value
    _View.RefreshRowCell(cell.RowHandle, cell.Column)
End Sub

winforms-grid-multi-cell-editing/VB/MultiSelectionEditingHelper.vb#L56

vb
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

vb
Dim info As GridViewInfo = TryCast(_View.GetViewInfo(), GridViewInfo)
Dim cellInfo As GridCellInfo = info.GetGridCellInfo(cell.RowHandle, cell.Column)
Return cellInfo.Bounds

See Also

Column

GridCell Class

GridCell Members

DevExpress.XtraGrid.Views.Base Namespace