Spread Windows Forms 12.0 Product Documentation
PreviewRowFetch Event
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : PreviewRowFetch Event
Occurs when the user customizes the preview row of the Spread component.
Syntax
'Declaration
 
Public Event PreviewRowFetch As PreviewRowFetchEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As PreviewRowFetchEventHandler
 
AddHandler instance.PreviewRowFetch, handler
public event PreviewRowFetchEventHandler PreviewRowFetch
Event Data

The event handler receives an argument of type PreviewRowFetchEventArgs containing data related to this event. The following PreviewRowFetchEventArgs properties provide information specific to this event.

PropertyDescription
Gets or sets the content of the preview row.  
Gets the row index that the preview row belongs to.  
Gets the view that contains the preview row.  
Example
This example uses the PreviewRowFetch event.
FarPoint.Win.BevelBorder bord = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.DarkBlue, Color.Blue);
fpSpread1.Sheets[0].Cells[0, 1, 5, 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;
fpSpread1.Sheets[0].Rows.Count = 6;

private void fpSpread1_PreviewRowFetch(object sender, FarPoint.Win.Spread.PreviewRowFetchEventArgs e)
   {
        listBox1.Items.Add(e.Row);
   }
Dim bord As New FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.DarkBlue, Color.Blue)
FpSpread1.Sheets(0).Cells(0, 1, 5, 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
FpSpread1.Sheets(0).Rows.Count = 6

Private Sub FpSpread1_PreviewRowFetch(sender As Object, e As FarPoint.Win.Spread.PreviewRowFetchEventArgs) Handles FpSpread1.PreviewRowFetch
  ListBox1.Items.Add(e.Row)
End Sub
See Also