Spread Windows Forms 9.0 Product Documentation
ChildWorkbookCreated Event
Example 


Occurs when a child workbook of the Spread component is created.
Syntax
'Declaration
 
Public Event ChildWorkbookCreated As ChildWorkbookCreatedEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As ChildWorkbookCreatedEventHandler
 
AddHandler instance.ChildWorkbookCreated, handler
public event ChildWorkbookCreatedEventHandler ChildWorkbookCreated
Event Data

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

PropertyDescription
WorkbookGets the child SpreadView object being created.  
Remarks

This event is raised by the OnChildWorkbookCreated method when a child workbook has been created.

For more details on the individual event arguments, refer to ChildWorkbookCreatedEventArgs members.

Example
This example raises the ChildWorkbookCreated event.
fpSpread1.ChildWorkbookCreated += new FarPoint.Win.Spread.ChildWorkbookCreatedEventHandler(fpSpread1ChildWorkbookCreated);

private void fpSpread1ChildWorkbookCreated(object sender, FarPoint.Win.Spread.ChildWorkbookCreatedEventArgs e)
{
      e.Workbook.Sheets[e.Workbook.ActiveSheetIndex].AlternatingRows[0].BackColor = Color.Yellow;
}
Dim eh As FarPoint.Win.Spread.ChildWorkbookCreatedEventHandler = AddressOf FpSpread1ChildWorkbookCreated
AddHandler FpSpread1.ChildWorkbookCreated, eh

Private Sub FpSpread1ChildWorkbookCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildWorkbookCreatedEventArgs)
Handles FpSpread1.ChildWorkbookCreated
      e.Workbook.Sheets(e.Workbook.ActiveSheetIndex).AlternatingRows(0).BackColor = Color.Yellow
End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FpSpread Class
FpSpread Members
ChildWorkbookCreatedEventArgs Class

 

 


Copyright © GrapeCity, inc. All rights reserved.