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

    <p>Hi</p><p>1) I reference the new DLL's<br>2) Compile and run the program and open a form with a grid.<br>3) Then I get a runtime error at this line (in the Designer.vb file)</p><p>Me.SprdDO.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded</p><p>It throws a NullReferenceException with this stack trace:</p><p>   at FarPoint.Win.Spread.SpreadView.g(Boolean A_0)<br>   at FarPoint.Win.Spread.SpreadView.et()<br>   at FarPoint.Win.Spread.SpreadView.f3()<br>   at FarPoint.Win.Spread.SpreadView.set_HorizontalScrollBarPolicy(ScrollBarPolicy value)<br>   at FarPoint.Win.Spread.FpSpread.set_HorizontalScrollBarPolicy(ScrollBarPolicy value)</p><p>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.</p><p> I've tried different things without success. Any ideas? <br></p><p> </p><p> </p><p> </p><p> </p>
  • Replied 8 September 2017, 2:31 pm EST

    <P>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 </P><FONT size=2 face=Consolas><FONT size=2 face=Consolas>
    <P><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></P>
    <P><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></P>
    <P><FONT size=2 face=Consolas><FONT size=2 face=Consolas>Its possible something got corrupted in your installation. Could you try reinstalling the product?</P></FONT></FONT>
  • Replied 8 September 2017, 2:31 pm EST

    <p>Thanks for taking your time.</p><p>I've looked further at it now and it was kinda my own fault.</p><p>The Spread class was apparantly wrapped in another class (that inherited from Spread). And when I recompiled that class everything worked again.<br></p>
Need extra support?

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

Learn More

Forum Channels