Occurs when the selection of cells on the sheet is changing.
Syntax
Event Data
The event handler receives an argument of type SelectionChangingEventArgs containing data related to this event. The following SelectionChangingEventArgs properties provide information specific to this event.
Property | Description |
---|
Cancel | Gets or sets whether the selection action should be cancelled. |
CurrentColumn | Gets the column index of the cell that contains the mouse pointer. |
CurrentRow | Gets the row index of the cell that contains the mouse pointer. |
Range | Gets the range of cells encompassing the selection. |
View | Gets the view that contains the selection. |
Remarks
Example
This example raises the event.
C# | Copy Code |
---|
private void fpSpread1_SelectionChanging(object sender, FarPoint.Win.Spread.SelectionChangingEventArgs e)
{
FarPoint.Win.Spread.Model.CellRange cr;
cr = e.View.Sheets[0].GetSelection(0);
Label1.BackColor = Color.Blue;
Label1.Text = "The first column in the selection is " + cr.Column + " and the first row is " + cr.Row;
} |
Visual Basic | Copy Code |
---|
Private Sub FpSpread1_SelectionChanging(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.SelectionChangingEventArgs)
Handles FpSpread1.SelectionChanging
Dim cr As FarPoint.Win.Spread.Model.CellRange
cr = e.View.Sheets(0).GetSelection(0)
Label1.BackColor = Color.Blue
Label1.Text = "The first column in the selection is " & cr.Column & " and the first row is " & cr.Row
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