Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub UltraGrid1_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles ultraGrid1.InitializeRow
' ReInitialize indicates whether the row is being initialized for the first time
' or it's being re-initialized.
If e.ReInitialize Then
Debug.WriteLine("A row is being re-initilaized.")
Else
Debug.WriteLine("A row is being initilaized.")
End If
Dim band As UltraGridBand = Me.ultraGrid1.DisplayLayout.Bands(0)
' Check to see if the row is from band 0.
'
If e.Row.Band Is Me.ultraGrid1.DisplayLayout.Bands(0) Then
' Create a custom description that we want shown in the row's
' row preview area.
Dim description As System.Text.StringBuilder = New System.Text.StringBuilder()
description.Append(e.Row.GetCellText(band.Columns("ContactName")))
description.Append(vbCrLf)
description.Append(e.Row.GetCellText(band.Columns("City")))
description.Append(", ")
description.Append(e.Row.GetCellText(band.Columns("Country")))
' Set the row's Description to our custom description text.
e.Row.Description = description.ToString()
End If
End Sub