Posted 5 December 2023, 6:30 am EST
We are currently upgrading an old spread to the current version.
With the new version I was not able to open the Spread Designer at runtime.
In the old version we used the DesignerMain class, which worked fine.
With the current version I tried DesignerMain and FpSpreadDesigner, but both throw exceptions before doing anything.
I could reproduce the problems with a new application.
- I created a new Winforms application
- I added all ddls. from the NuGet packages GrapeCity.Spread.WinForms and GrapeCity.Spread.WinForms.Design
- I dragged a new spread and 2 buttons into the form
- and I add the button code:
private void button1_Click(object sender, EventArgs e)
{
FarPoint.Win.Spread.Design.FpSpreadDesigner fpSpreadDesigner1 = new FarPoint.Win.Spread.Design.FpSpreadDesigner();
fpSpreadDesigner1.Show(fpSpread1);
}
This throws a System.NullReferenceException.
private void button2_Click(object sender, EventArgs e)
{
FarPoint.Win.Spread.Design.DesignerMain DesignerMain1 = new FarPoint.Win.Spread.Design.DesignerMain(fpSpread1);
DesignerMain1.Show();
}
And this throws a System.ArgumentOutOfRangeException.
Can you tell me what I did wrong or how I can open the spread designer?
Spread.Designer.Test.zip