How do I determine the first row being displayed (.NET FP spreadsheet)

Posted by: mchargue on 8 September 2017, 12:27 pm EST

  • Posted 8 September 2017, 12:27 pm EST

    Folks;


     


    I have multiple sheets, and when the user switches between sheets, I would like to slew to the same top-most row in the next sheet.  However, I can't figure out how to get the top-most row being displayed on the 'last' sheet, or how to make that same row the top-most displayed row on the 'new' sheet.


    Any help?


    TIA;


    Pat


     

  • Replied 8 September 2017, 12:27 pm EST

    Pat -

    You can use the GetViewportTopRow and SetViewportTopRow methods to acheive this.
  • Replied 8 September 2017, 12:27 pm EST

    Bump - still looking fo an answer


     

  • Replied 8 September 2017, 12:27 pm EST

    BobM:
    Pat -

    You can use the GetViewportTopRow and SetViewportTopRow methods to acheive this.


    Sorry, didn't see this.  I'll test


    Pat


     

  • Replied 8 September 2017, 12:27 pm EST

    BobM:
    Pat -

    You can use the GetViewportTopRow and SetViewportTopRow methods to acheive this.


    Thanks.


    FYI:


     

     
      Private Sub ChannelSS_ActiveSheetChanging(ByVal sender As Object, ByVal eventArgs As FarPoint.Win.Spread.ActiveSheetChangingEventArgs) Handles ChannelSS.ActiveSheetChanging
    '
    ' When the sheet changes, make sure that we keep the same top row displayed.
    '

    Try
    DummyInteger = ChannelSS.GetViewportTopRow(ChannelSS.ActiveSheetIndex, 0) 'Get the active sheet's first display row,

    ChannelSS.SetViewportTopRow(ChannelSSTabs.Setup_Tab, 0, DummyInteger) 'Make that the same display row

    ChannelSS.SetViewportTopRow(ChannelSSTabs.Units_Tab, 0, DummyInteger) 'on the other sheets.

    ChannelSS.SetViewportTopRow(ChannelSSTabs.DOF_Tab, 0, DummyInteger)
    Catch ex As Exception
    Call LogVBerror(ex)
    End Try

    End Sub

     
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels