Skip to main content

CalcPreviewTextEventArgs.RowHandle Property

Gets the handle of the row whose preview text is to be generated.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public int RowHandle { get; }

Property Value

Type Description
Int32

An integer value representing a handle of the row whose preview text is to be generated.

Remarks

The obtained row handle can be used, for instance, to get cell values within the currently processed row. This can be used to construct the preview text for values displayed across several fields. To obtain cell values, use the ColumnView.GetRowCellDisplayText and ColumnView.GetRowCellValue methods.

For information on row handles, refer to the Rows help topic.

Example

This example customizes the row preview text.

using DevExpress.XtraGrid.Views.Grid;

   private void gridView1_CalcPreviewText(object sender, CalcPreviewTextEventArgs e) {
    GridView view = sender as GridView;
    if (view == null) return;
    e.PreviewText = "Item: " + e.PreviewText + "; Units: " + 
        view.GetRowCellDisplayText(e.RowHandle, _
        view.Columns["UnitsOnOrder"]) + ".";
   }
See Also