How to: Dynamically Provide Display Text for Preview Sections

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"]) + ".";
   }