Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / SheetView.DocumentModels Class / ResetViewRowIndexes Method
Example


In This Topic
    ResetViewRowIndexes Method
    In This Topic
    Resets all row indexes in the sheet to be the same as the row indexes in the corresponding data model.
    Syntax
    'Declaration
     
    Public Sub ResetViewRowIndexes() 
    'Usage
     
    Dim instance As SheetView.DocumentModels
     
    instance.ResetViewRowIndexes()
    public void ResetViewRowIndexes()
    Remarks

    If the cell spans are invisible then this method will cause them to become visible.

    The row and column indexes in the SheetView are the same as the ones in the models until a mapping is created.

    Example
    This example resets the mappings.
    fpSpread1.AllowColumnMove = true;
    fpSpread1.ActiveSheet.AddSpanCell(0, 0, 2, 2);
    
    private void fpSpread1_ColumnDragMove(object sender, FarPoint.Win.Spread.DragMoveEventArgs e)
    {
    e.MoveContent = true;
    }
    
    private void button1_Click(object sender, System.EventArgs e)
    {
    fpSpread1.ActiveSheet.Models.ResetViewColumnIndexes();
    fpSpread1.ActiveSheet.Models.ResetViewRowIndexes();
    }
    FpSpread1.AllowColumnMove = True
    FpSpread1.ActiveSheet.AddSpanCell(0, 0, 2, 2)
    
    Private Sub FpSpread1_ColumnDragMove(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.DragMoveEventArgs) Handles FpSpread1.ColumnDragMove
    e.MoveContent = True
    End Sub
    
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    FpSpread1.ActiveSheet.Models.ResetViewColumnIndexes()
    FpSpread1.ActiveSheet.Models.ResetViewRowIndexes()
    End Sub
    See Also