CalcPreviewTextEventArgs.RowHandle Property

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

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

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

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.

Examples

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