Spread Windows Forms 7.0 Product Documentation
TopChange Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : TopChange Event


Glossary Item Box

Occurs when the top row changes.

Syntax

Visual Basic (Declaration) 
Public Event TopChange As TopChangeEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As TopChangeEventHandler
 
AddHandler instance.TopChange, handler
C# 
public event TopChangeEventHandler TopChange

Event Data

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

PropertyDescription
NewTop Gets the index of the new top row.
OldTop Gets the index of the previous top row.
RowViewportIndex Gets the index of the viewport row in which the change occurred.

Remarks

This event is raised by the OnTopChange method when a different row becomes the new top row.

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

Example

This example raises the TopChange event.
C#Copy Code
private void fpSpread1_TopChange(object sender, FarPoint.Win.Spread.TopChangeEventArgs e)
{
      Label1.Text = "The new top is " + e.NewTop.ToString;
}
Visual BasicCopy Code
Private Sub FpSpread1_TopChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.TopChangeEventArgs) Handles FpSpread1.TopChange
     Label1.Text = "The new top is " & e.NewTop.ToString
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

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.