Spread WPF Documentation
SelectionChanged Event (GcSpreadSheet)
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class : SelectionChanged Event
Occurs when the selection of cells on the sheet is changed.
Syntax
'Declaration
 
Public Event SelectionChanged As System.EventHandler(Of EventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As System.EventHandler(Of EventArgs)
 
AddHandler instance.SelectionChanged, handler
public event System.EventHandler<EventArgs> SelectionChanged
Example
This example uses the SelectionChanged event.
private void gcSpreadSheet1_SelectionChanged(object sender, EventArgs e)
        {
            listBox1.Items.Add("SelectionChanged");
        }

private void gcSpreadSheet1_SelectionChanging(object sender, GrapeCity.Windows.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 System.Object, e As System.EventArgs) Handles GcSpreadSheet1.SelectionChanged
        ListBox1.Items.Add("SelectionChanged")
    End Sub

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

Reference

GcSpreadSheet Class
GcSpreadSheet Members