GrapeCity.Xaml.SpreadSheet.UI
SelectionChanging Event (GcSpreadSheet)
Example 


Occurs when the selection of cells on the sheet is changing.
Syntax
'Declaration
 
Public Event SelectionChanging As EventHandler(Of SelectionChangingEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of SelectionChangingEventArgs)
 
AddHandler instance.SelectionChanging, handler
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
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.

PropertyDescription
NewSelections Gets the new selection ranges.  
OldSelections Gets the old selection ranges.  
Example
This example uses the SelectionChanging event.
private void gcSpreadSheet1_SelectionChanged(object sender, EventArgs e)
        {
            listBox1.Items.Add("SelectionChanged");
        }

private void gcSpreadSheet1_SelectionChanging(object sender, GrapeCity.Xaml.SpreadSheet.UI.SelectionChangingEventArgs e)
        {
            listBox1.Items.Add(e.NewSelections[0].Column.ToString());
            listBox1.Items.Add(e.OldSelections.Length.ToString());
        }
Private Sub GcSpreadSheet1_SelectionChanged(sender As Object, e As System.EventArgs) Handles GcSpreadSheet1.SelectionChanged
        ListBox1.Items.Add("SelectionChanged")
    End Sub

    Private Sub GcSpreadSheet1_SelectionChanging(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.SelectionChangingEventArgs) Handles GcSpreadSheet1.SelectionChanging
        ListBox1.Items.Add(e.NewSelections(0).Column.ToString())
        ListBox1.Items.Add(e.OldSelections.Length.ToString())
    End Sub
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options