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


GrapeCity.Xaml.SpreadSheet.UI Namespace > GcSpreadSheet Class : LeftColumnChanged Event
Occurs when the left column changes.
Syntax
'Declaration
 
Public Event LeftColumnChanged As EventHandler(Of ViewportEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of ViewportEventArgs)
 
AddHandler instance.LeftColumnChanged, handler
public event EventHandler<ViewportEventArgs> LeftColumnChanged
Event Data

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

PropertyDescription
Gets the index of the new viewport index.  
Gets the index of the previous viewport index.  
Gets the index of the viewport in which the change occurred.  
Example
This example uses the LeftColumnChanged event.
private void gcSpreadSheet1_LeftColumnChanged(object sender, GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs e)
        {
            listBox1.Items.Add(e.OldIndex.ToString());
            listBox1.Items.Add(e.NewIndex.ToString());
        }

        private void gcSpreadSheet1_TopRowChanged(object sender, GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs e)
        {
            listBox1.Items.Add(e.OldIndex.ToString());
            listBox1.Items.Add(e.NewIndex.ToString());
        }
Private Sub gcSpreadSheet1_LeftColumnChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs) Handles gcSpreadSheet1.LeftColumnChanged
        ListBox1.Items.Add(e.OldIndex.ToString())
        ListBox1.Items.Add(e.NewIndex.ToString())
    End Sub

    Private Sub gcSpreadSheet1_TopRowChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs) Handles gcSpreadSheet1.TopRowChanged
        ListBox1.Items.Add(e.OldIndex.ToString())
        ListBox1.Items.Add(e.NewIndex.ToString())
    End Sub
Private Sub gcSpreadSheet1_LeftColumnChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs) Handles gcSpreadSheet1.LeftColumnChanged
        ListBox1.Items.Add(e.OldIndex.ToString())
        ListBox1.Items.Add(e.NewIndex.ToString())
    End Sub

    Private Sub gcSpreadSheet1_TopRowChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ViewportEventArgs) Handles gcSpreadSheet1.TopRowChanged
        ListBox1.Items.Add(e.OldIndex.ToString())
        ListBox1.Items.Add(e.NewIndex.ToString())
    End Sub
See Also