本示例定制行的预览文本。

C#CopyCode image复制代码
using DevExpress.XtraGrid.Views.Grid;

   private void gridView1_CalcPreviewText(object sender, CalcPreviewTextEventArgs e) {
      e.PreviewText = "Item: " + e.PreviewText + "; Units: " + 
        gridView1.GetRowCellDisplayText(e.RowHandle, _
        gridView1.Columns["UnitsOnOrder"]) + ".";
   }
Visual BasicCopyCode image复制代码
Imports DevExpress.XtraGrid.Views.Grid

   Private Sub GridView1_CalcPreviewText(ByVal sender As System.Object, _
     ByVal e As CalcPreviewTextEventArgs) Handles GridView1.CalcPreviewText
      e.PreviewText = "Item: " + e.PreviewText + "; Units: " + _
        GridView1.GetRowCellDisplayText(e.RowHandle, _
        GridView1.Columns("UnitsOnOrder")) + "."
   End Sub