Spread Windows Forms 12.0 Product Documentation
PreviewRowContent Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PreviewRowFetchEventArgs Class : PreviewRowContent Property
Gets or sets the content of the preview row.
Syntax
'Declaration
 
Public Property PreviewRowContent As String
'Usage
 
Dim instance As PreviewRowFetchEventArgs
Dim value As String
 
instance.PreviewRowContent = value
 
value = instance.PreviewRowContent
public string PreviewRowContent {get; set;}
Example
This example uses the PreviewRowContent property.
private void Form1_Load(object sender, EventArgs e)
{
FarPoint.Win.BevelBorder bord = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.Red, Color.Blue);
fpSpread1.Sheets[0].Cells[0, 1, 10, 1].Text = "Preview Row";
fpSpread1.Sheets[0].PreviewRowInfo.Visible = true;
fpSpread1.Sheets[0].PreviewRowInfo.BackColor = Color.BurlyWood;
fpSpread1.Sheets[0].PreviewRowInfo.ForeColor = Color.Black;
fpSpread1.Sheets[0].PreviewRowInfo.Border = bord;
}

private void fpSpread1_PreviewRowFetch(object sender, FarPoint.Win.Spread.PreviewRowFetchEventArgs e)
{
  FarPoint.Win.Spread.SheetView sheetView = e.View.GetSheetView();
  if (sheetView.SheetName == "Sheet1")
  {
    if (e.PreviewRowContent == string.Empty)
      e.PreviewRowContent = "The preview row content is empty";
    if ((e.Row + 1) % 2 == 0)
      e.PreviewRowContent = string.Format("Preview Row Content is: {0}", e.PreviewRowContent);
  }
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim bord As New FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.DarkBlue, Color.Blue)
fpSpread1.Sheets(0).Cells(0, 1, 10, 1).Text = "Preview Row"
fpSpread1.Sheets(0).PreviewRowInfo.Visible = True
fpSpread1.Sheets(0).PreviewRowInfo.BackColor = Color.BurlyWood
fpSpread1.Sheets(0).PreviewRowInfo.ForeColor = Color.Black
fpSpread1.Sheets(0).PreviewRowInfo.Border = bord
End Sub

Private Sub fpSpread1_PreviewRowFetch(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.PreviewRowFetchEventArgs) Handles fpSpread1.PreviewRowFetch
        Dim sheetView As FarPoint.Win.Spread.SheetView
        sheetView = e.View.GetSheetView()
        If sheetView.SheetName = "Sheet1" Then
            If (e.PreviewRowContent = String.Empty) Then
                e.PreviewRowContent = "The preview row content is empty"
            End If
            If ((e.Row + 1) / 2 = 0) Then
                e.PreviewRowContent = String.Format("Preview Row Content is: {0}", e.PreviewRowContent)
            End If
        End If
End Sub
See Also

Reference

PreviewRowFetchEventArgs Class
PreviewRowFetchEventArgs Members