GrapeCity.Xaml.SpreadSheet.UI
NewIndex Property
Example 


GrapeCity.Xaml.SpreadSheet.UI Namespace > ViewportEventArgs Class : NewIndex Property
Gets the index of the new viewport index.
Syntax
'Declaration
 
Public ReadOnly Property NewIndex As Integer
'Usage
 
Dim instance As ViewportEventArgs
Dim value As Integer
 
value = instance.NewIndex
public int NewIndex {get;}

Property Value

The index of the new viewport index.
Example
This example uses the NewIndex property.
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
See Also

Reference

ViewportEventArgs Class
ViewportEventArgs Members