Spread Windows Forms 8.0 Product Documentation
ChildWorkbookCreatedEventHandler Delegate
ExampleExample 


Source of the event
Event data
Represents a defined method that handles the ChildWorkbookCreated event for the Spread component.
Syntax
'Declaration
 
Public Delegate Sub ChildWorkbookCreatedEventHandler( _
   ByVal sender As Object, _
   ByVal e As ChildWorkbookCreatedEventArgs _
) 
'Usage
 
Dim instance As New ChildWorkbookCreatedEventHandler(AddressOf HandlerMethod)
public delegate void ChildWorkbookCreatedEventHandler( 
   object sender,
   ChildWorkbookCreatedEventArgs e
)

Parameters

sender
Source of the event
e
Event data
Remarks
For information on the event, refer to the FpSpread ChildWorkbookCreated event.
Example
This example changes the background color of the alternating rows in the workbook.
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 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

ChildWorkbookCreatedEventHandler Members
FarPoint.Win.Spread Namespace
ChildWorkbookCreated Event
ChildWorkbookCreatedEventArgs Class

 

 


Copyright © GrapeCity, inc. All rights reserved.