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

    <BLOCKQUOTE><div><img src="/wp-content/uploads/CS_images/icon-quote.gif"> BobM:</div><div>Pat -

    You can use the GetViewportTopRow and SetViewportTopRow methods to acheive this.
    </div></BLOCKQUOTE>


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


    Pat


     

  • Replied 8 September 2017, 12:27 pm EST

    <BLOCKQUOTE><div><img src="/wp-content/uploads/CS_images/icon-quote.gif"> BobM:</div><div>Pat -

    You can use the GetViewportTopRow and SetViewportTopRow methods to acheive this.
    </div></BLOCKQUOTE>


    Thanks.


    FYI:


     

     
      <SPAN class=kwd>Private Sub</SPAN> ChannelSS_ActiveSheetChanging(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> eventArgs <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.ActiveSheetChangingEventArgs) <SPAN class=kwd>Handles</SPAN> ChannelSS.ActiveSheetChanging
    <SPAN class=cmt>'
    ' When the sheet changes, make sure that we keep the same top row displayed.
    '
    </SPAN>
    <SPAN class=kwd>Try</SPAN>
    DummyInteger = ChannelSS.GetViewportTopRow(ChannelSS.ActiveSheetIndex, 0) <SPAN class=cmt>'Get the active sheet's first display row,
    </SPAN>
    ChannelSS.SetViewportTopRow(ChannelSSTabs.Setup_Tab, 0, DummyInteger) <SPAN class=cmt>'Make that the same display row
    </SPAN>
    ChannelSS.SetViewportTopRow(ChannelSSTabs.Units_Tab, 0, DummyInteger) <SPAN class=cmt>'on the other sheets.
    </SPAN>
    ChannelSS.SetViewportTopRow(ChannelSSTabs.DOF_Tab, 0, DummyInteger)
    <SPAN class=kwd>Catch</SPAN> ex <SPAN class=kwd>As</SPAN> Exception
    <SPAN class=kwd>Call</SPAN> LogVBerror(ex)
    <SPAN class=kwd>End Try

    End Sub</SPAN>
     
Need extra support?

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

Learn More

Forum Channels