Runtime error when upgrading from 4.0.3512.2008 4.0.3526.2008 (When setting HorizontalScrollBarPolicy)

Posted by: dfds on 8 September 2017, 2:31 pm EST

  • Posted 8 September 2017, 2:31 pm EST


    1) I reference the new DLL's
    2) Compile and run the program and open a form with a grid.
    3) Then I get a runtime error at this line (in the Designer.vb file)

    Me.SprdDO.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded

    It throws a NullReferenceException with this stack trace:

       at FarPoint.Win.Spread.SpreadView.g(Boolean A_0)
       at FarPoint.Win.Spread.SpreadView.f3()
       at FarPoint.Win.Spread.SpreadView.set_HorizontalScrollBarPolicy(ScrollBarPolicy value)
       at FarPoint.Win.Spread.FpSpread.set_HorizontalScrollBarPolicy(ScrollBarPolicy value)

    There's a lot of lines setting different properties on the Me.SprdDO object above where it fails. So it is able to access the object and set properties.. just not on this line.

     I've tried different things without success. Any ideas?





  • Replied 8 September 2017, 2:31 pm EST

    I was unable to replicate this here I created a new project adding a Spread 4.0.3526.2008 to the form. I opened the Form1Designer.cs file (equivalent to your Designer.vb file) and added the line

    <FONT size=2 face=Consolas><FONT size=2 face=Consolas>

    <SPAN style="FONT-FAMILY:Consolas;COLOR:blue;FONT-SIZE:10pt;">this</SPAN><SPAN style="FONT-FAMILY:Consolas;FONT-SIZE:10pt;">.fpSpread1.HorizontalScrollBarPolicy = FarPoint.Win.Spread.<SPAN style="COLOR:#2b91af;">ScrollBarPolicy</SPAN>.AsNeeded;</SPAN> </FONT></FONT>

    <FONT size=2 face=Consolas><FONT size=2 face=Consolas>This didn't cause any errors for me and seemed to work in the Spread. horizontal scrollbar performance.</FONT></FONT>

    <FONT size=2 face=Consolas><FONT size=2 face=Consolas>Its possible something got corrupted in your installation. Could you try reinstalling the product?

  • Replied 8 September 2017, 2:31 pm EST

    Thanks for taking your time.

    I've looked further at it now and it was kinda my own fault.

    The Spread class was apparantly wrapped in another class (that inherited from Spread). And when I recompiled that class everything worked again.

Need extra support?

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

Learn More

Forum Channels