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


Glossary Item Box

Occurs when the user leaves a cell.

Syntax

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

Event Data

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

PropertyDescription
Cancel Gets or sets whether to cancel the cell navigation.
Column Gets the column index of the cell being left.
NewColumn Gets the column index of the cell being entered.
NewRow Gets the row index of the cell being entered.
Row Gets the row index index of the cell being left.

Remarks

This event is raised by the OnLeaveCell method when the user leaves a cell.

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

Example

This example raises the LeaveCell event when the user leaves a cell.
C#Copy Code
fpSpread1.EditMode = true;
Label1.Text = "Click on a different cell to fire the event";

private void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
{
     ListBox1.Items.Add("LeaveCell event fired!");
}
Visual BasicCopy Code
FpSpread1.EditMode = True
Label1.Text = "Click on a different cell to fire the event"

Private Sub FpSpread1_LeaveCell(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.LeaveCellEventArgs) Handles FpSpread1.LeaveCell
     ListBox1.Items.Add("LeaveCell event fired!")
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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