Spread scrolls back to the first row problem

Posted by: p.feenstra on 11 July 2021, 7:10 pm EST

  • Posted 11 July 2021, 7:10 pm EST

    After upgrading from r12 to r14 there seems to be a serious issue with FpSpread.

    If you add rows via code to Spread and also the active row is outside the viewport then Spread always scrolls back to the first row.

    Result: a not workable environment and (for us) very unwise to upgrade to this version.

    Environment

    • Win 10
    • VS 2019 Framework 4.8
    • databound sheets

    Regards Piet

  • Posted 11 July 2021, 8:24 pm EST - Updated 30 September 2022, 4:18 am EST

    Hi Piet,

    Please check the attached sample and GIF demonstrating the behavior I’m observing.

    Let me know if I need anything else to replicate the issue.

    ScrollToTopIssue.zip

    Regards,

    Jitender

  • Posted 11 July 2021, 9:53 pm EST

    First thanks for your quick response, super!!

    Also forgot to mention my version: 14.45.20201

    I’ve tested your code sample and adapted to my way of working

    private void BtnAddRow_Click(object sender, EventArgs e)

    {

    int row = fpSpread1.ActiveSheet.ActiveRowIndex + 1;

    fpSpread1.SuspendLayout();

    fpSpread1.ActiveSheet.SetActiveCell(row, 0);

    fpSpread1.ActiveSheet.AddUnboundRows(row, 1);

    fpSpread1.ActiveSheet.SetValue(row, 0, row.ToString());

    fpSpread1.ActiveSheet.AddRowToDataSource(row, true);

    fpSpread1.ResumeLayout();

    }

    It works like expected, no problems at all.

    Now i wonder what is different in my application.

    I already checked my references. That all seems to be fine

    Any ideas?

    Regards Piet

  • Posted 12 July 2021, 4:06 pm EST

    The viewport should not change automatically unless it is changed somewhere.

    You mentioned that this started happening after upgrading to Spread 14.

    Have you tried adding references of Spread 12 and then checking if the issue still appears or not?

    If you can attach a sample application replicating the issue then we can investigate it at our end.

    Thanks,

    Jitender

  • Posted 12 July 2021, 9:07 pm EST

    I have an exact copy of the application with references to r12 and there everything works fine.

    At r14 the viewport does change based on the same source code.

    I’m still of the opinion that the cause is most likely in the data binding.

    Possibly because the sql statement contains a Sort By.

    Have you already tried to connect to an mdb database? (if yes, then also use a Sort By)

    If you want you can watch my screen and check my code at the same time.

    Regards Piet

  • Posted 12 July 2021, 11:28 pm EST

    Hi Piet,

    I’ve created a case for you on the Support portal. You should have received an email for the same.

    Please continue this issue on the Support portal.

    PS: I’ve checked it by using an mdb file as data source using a query with ordered results, but it still worked correctly in the sample application I attached earlier.

    Thanks,

    Jitender

Need extra support?

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

Learn More

Forum Channels