windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customrowcelleventargs-b50bab17.md
Gets the handle of the row that contains the processed 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 specifying the handle of the row that contains the cell.
|
See the Rows document for information on row handles.
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.
if(e.Column.FieldName == ButtonColumnName) {
ISimpleBusinessAction order = gridListEditor.GridView.GetRow(e.RowHandle) as ISimpleBusinessAction;
if(order != null) {
winforms-grid-update-row-style-on-cell-value-change/CS/Form1.cs#L54
{
if (!true.Equals(gridView1.GetRowCellValue(e.RowHandle, "UseStyles")))
return;
winforms-grid-highlight-modified-cells/CS/Form1.cs#L32
void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) {
if (CellExists(gridView1.GetDataSourceRowIndex(e.RowHandle), e.Column)) {
e.Appearance.BackColor = Color.ForestGreen;
winforms-grid-customize-cell-color/CS/CellColorHelper.cs#L29
{
Color color = GetCellColor(new MyGridCell(e.RowHandle, e.Column));
if (color.IsEmpty)
winforms-grid-hide-check-box-from-certain-cells/CS/CS/Form1.cs#L122
if(e.Column.FieldName == "Discontinued" &&
NeedToHideDiscontinuedCheckbox(sender as GridView, e.RowHandle))
e.RepositoryItem = emptyEditor;
winforms-grid-update-row-style-on-cell-value-change/VB/Form1.vb#L52
Private Sub gridView1_RowCellStyle(ByVal sender As Object, ByVal e As RowCellStyleEventArgs)
If Not True.Equals(gridView1.GetRowCellValue(e.RowHandle, "UseStyles")) Then Return
e.Appearance.BackColor = GetRowBackColor(e.RowHandle)
winforms-grid-highlight-modified-cells/VB/Form1.vb#L34
Private Sub gridView1_RowCellStyle(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs)
If CellExists(gridView1.GetDataSourceRowIndex(e.RowHandle), e.Column) Then
e.Appearance.BackColor = Color.ForestGreen
winforms-grid-customize-cell-color/VB/CellColorHelper.vb#L25
Private Sub _View_RowCellStyle(ByVal sender As Object, ByVal e As RowCellStyleEventArgs)
Dim color As Color = GetCellColor(New MyGridCell(e.RowHandle, e.Column))
If color.IsEmpty Then Return
winforms-grid-hide-check-box-from-certain-cells/VB/CS/Form1.vb#L112
Private Sub gridView1_CustomRowCellEdit(ByVal sender As Object, ByVal e As CustomRowCellEditEventArgs)
If Equals(e.Column.FieldName, "Discontinued") AndAlso NeedToHideDiscontinuedCheckbox(TryCast(sender, GridView), e.RowHandle) Then e.RepositoryItem = emptyEditor
End Sub
See Also