Vertical Scroll bar position

Posted by: anjanguha on 8 September 2017, 5:15 am EST

    • Post Options:
    • Link

    Posted 8 September 2017, 5:15 am EST

    Hi,

    The users of our product has a very specific requirement during the refresh action of the farpoint grid. During a refresh the application gets new data, repaints and rebinds the data to the grid.

    Before the refresh if the user has actually scrolled to the last row of the grid, after refresh the scrollbar automatically moves to the top (thus the user again has to scroll down to the bottom). The user requirement is that the scroll position remains the same after refresh.

    I was trying to find the position of the scrollbar before refresh and after refresh trying to set it back to the earlier position. But I am not being able to find the appropriate properties to get and set.

    Need your help in this regard. 

     

     

  • Posted 8 September 2017, 5:15 am EST

    Hello,

    We are unable to replicate the issue with Spread's latest build 4.0.3515.2008 as after refreshing the grid, the scolled position remains same. Please try upgrading your Spread to the latest maintenance build of Spread and let us know your further observations on the same.

    Thanks.

  • Posted 8 September 2017, 5:15 am EST

    Hi,

    I have downloaded the Spread for Windows Forms for 3.5 Framework 4 ( 04.00.3515) and the behaviour is the same. To be clear,  during the refresh the grid is recreated again with different columns and so it is  a new instance of the grid and not the one before refresh.

    I don't think if a new instance of the grid is created, it will retain the original scroll position. This is the problem, so the best way to do this is to know the last scroll position and set it back

     

    Thanks,

    Anjan

     

  • Posted 8 September 2017, 5:15 am EST

    Hello Anjan,

    You should be able to use the TopChange event and declare a global variable of type Integer and set it to e.NewTop and then after refreshing use the SetViewportTopRow to achieve this.



    int i = 0;

    private void button1_Click(object sender, EventArgs e)

            {

                fpSpread1.Refresh();

                fpSpread1.SetViewportTopRow(0, i);

            }

    private void fpSpread1_TopChange(object sender, FarPoint.Win.Spread.TopChangeEventArgs e)

            {

                i = e.NewTop;

            }

    Hope this will help you. Thanks.

  • Posted 8 September 2017, 5:15 am EST

    Working

    Thanks,

    Anjan

  • Posted 8 September 2017, 5:15 am EST

    Hi Reeva. Am also facing this problem. i have the spread sheet and i press in last row open another form and made changes and close then come back to this form its again loaded but set active row index is last row and add selection for this row but the scroll bar in top no t bottom why. Am using spread 6.0.3505.

    It Urgent so reply soon plz…

  • Posted 8 September 2017, 5:15 am EST

    Hi,

    I could not replicate the issue using the latest build of Spread. Please find a small sample application created at my end attached. You may want to modify the same and send back to us so that we can try investigating the problem at our end and assist you further accordingly.

    Note- Since Spread 6 is no longer in active development, any issue reported with this version would be fixed in case it exists in the latest version of the product line i.e. Spread 7. Therefore, you are suggested to download the latest build from the following link and check if the problem still persists on using the same:

    http://www.componentone.com/SuperProducts/SpreadStudio/

    Thanks and Regards,

    Pragati Kaushik

    2014/04/SetVerticalScrollBarPosition.zip

  • Posted 6 April 2018, 1:04 am EST

    Hi,

    I was using farpoint 9.4 SP1. I upgraded it to the farpoint for 11.4 now i am facing the issue of vertical scroll position it is not setting its value according to the cell selection. In version 9.0 i faced same issue you suggest to upgrade it to SP1 now on upgrading it to 11.4 I am facing same issue

Need extra support?

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

Learn More

Forum Channels