Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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