Error with spread

Posted by: vkempanna on 8 September 2017, 1:03 pm EST

  • Posted 8 September 2017, 1:03 pm EST

    Hi,


    When i try to open my form which has the spread control on it, i get an error something like this.


    I have attached the snapshot for your reference.


     


     


    2008/02/FPSpreadErr1.JPG
  • Replied 8 September 2017, 1:03 pm EST

    Hi,


    I am using spread for .NET  Win forms.


    I have updated spread fron ver 3.0  to ver 4.0.


    I am not able to find the reference for spread 3.0.


    How can i do Binding Redirect for the framework?


    Regards


    Vinutha


     


     

  • Replied 8 September 2017, 1:03 pm EST

    Hello,


    Have you updated your project to a new version of Spread? If so, you will need to either set up a Binding Redirect for your framework, or load the older version of the assembly back into the project, set the SerializeModels property of this SheetView object to False, and save the form. Then you should be able to reload the project with the new assemblies correctly.

  • Replied 8 September 2017, 1:03 pm EST

    Vinutha,


    Here are the instructions from the ReadMe file on setting a Binding Redirect.


    For users of Microsoft Visual Studio .NET 2008, to avoid exceptions when loading a form from a previously created project, please follow these instructions for setting a binding redirect for each of the assemblies of FarPoint Spread for Windows Forms.


    If you have made changes to a FarPoint Spread control on a form at design time that required writing objects to the RESX file for the form, then you will not be able to load the form at design time unless you set a binding redirect in the machine.config file for each of these assemblies used by FarPoint Spread:





























    assembly name
    latest
    previous version    

    new version
    FarPoint.Win2.0.0.02.0.1.0
       
    FarPoint.Win.Spread       1.0.1.0 - 1.0.2.01.0.3.0
      2.0.0.02.0.1.0
       


    Note that your version numbers may vary depending on whether you had a beta or release candidate version. This table shows a general example. See the current release notes for version details.


    Without these binding redirects, if the previous version of an assembly is present in the Global Assembly Cache (GAC), then loading the form will throw invalid cast exceptions. Follow the procedure below for each of these assemblies.


      Binding Redirect Procedure


    To add the binding redirect:



    1. Open the Control Panel (Start > Settings > Control Panel).
    2. Run the Administrative Tools.
    3. Run the Microsoft .NET Framework Configuration.
    4. From the .NET Framework Configuration window, select Configured Assemblies from the menu on the left.
    5. In the Configured Assemblies pane on the right, in the Task area, select Configure an Assembly.
    6. In the Configure an Assembly dialog, with the Choose an assembly from the assembly cache option button selected (the default), click the Choose Assembly button in the lower right.
    7. In the Choose Assembly from Assembly Cache window, scroll down until the assembly name appears. For example, find FarPoint.Win.Spread.
    8. Select the assembly, for example, FarPoint.Win.Spread version 1.0.1.0, from the list and click Finish.
    9. The Properties window for that assembly appears.
    10. Select the Binding Policy tab and type in the previous version number in the Request Version column and the new version number in the New Version column. For example, for FarPoint.Win.Spread, type in 1.0.1.0 in the Request Version column and 1.0.3.0 in the New version, as shown here. (Remember, your version numbers may differ from those given here.)

      Screen shot of Binding Policy tab with values


    11. Click OK.

    Repeat this procedure for each of the assemblies listed in the table at the top of this page.


    All references to the previous version of the assembly (FarPoint.Win.Spread.dll, version 1.0.1.0 in the above example) are then redirected to the new version of the assembly (FarPoint.Win.Spread.dll, version 1.0.3.0 in the above example), including references in the RESX file for a form at design time.


    If you subsequently uninstall the new version of FarPoint Spread for Windows Forms from your machine, then you need to remove the binding redirects. Refer to the procedure below for instructions.



    To be clear:


      This is not necessary if you remove the previous version of FarPoint.Win.Spread.dll from the Global Assembly Cache (GAC). You can uninstall the previous version or manually remove that version from the GAC.

      -->
    1. You do not need to keep this binding redirect after you have upgraded all your projects and loaded and saved them in the new version.



      Removing Binding Redirect Procedure


    To remove the binding redirect (if you have uninstalled the new version of FarPoint Spread for Windows Forms from your machine or you are finished upgrading all your projects and you do not need the binding redirect anymore):



    1. Open Control Panel (Start > Settings > Control Panel).
    2. Run Administrative Tools.
    3. Run Microsoft .NET Framework Configuration.
    4. From the .NET Framework Configuration window, select Configured Assemblies from the menu on the left.
    5. In the Configured Assemblies pane on the right, in the Task area, select View List of Configured Assemblies.
    6. Select the assembly name.
    7. Press the Delete key and select "Yes" in the confirmation dialog to remove the assembly configuration.

    Repeat this procedure for each of the assemblies used in FarPoint Spread for Windows Forms listed in the table at the top of this page.

  • Replied 8 September 2017, 1:03 pm EST

    Actually, I uninstalled all the previous version dlls from GAC and when I wanted to Rebirect, I did not find the old Version dlls. SO I again installed the old version dlls and Redirected these old dlls to new version dlls. When I did that, I could see the redirect entry in the new version also. Finally, it did not work.
  • Replied 8 September 2017, 1:03 pm EST

    Hello,


    Could you zip up your project and post it to the forums for us to debug the issue you are seeing? If not, could you email it to us at fpsupport@fpoint.com?

  • Replied 8 September 2017, 1:03 pm EST

    Hi - I dont find Farpoint.Win and Farpoint.Win.Spread when I click Choose Assembly as you mentioned in setp 7 above. Can you please help me?


     


    Thanks A Lot.

  • Replied 8 September 2017, 1:03 pm EST

    Tejashvini,  

    You need to install this dll in GAC. This is automatically done by the Spread installer. In case, if you have installed the Spread for windows and still cannot locate this assembly, you may open the C:\Windows\Assembly and manaully drag and drop this dll file. 

    Regards, 

  • Replied 8 September 2017, 1:03 pm EST

    I have the latest version (4.0) in GAC still I ssee the same error. Any idea??


     


    Thanks in Advance!!

  • Replied 8 September 2017, 1:03 pm EST

    I di dBinding Redirect but still see the same issue.


     


    Steps Taken:


    Admin Tools, Select the dll (the version shown for the dll was 4.0.2009.2005) and go to biding...tab..give both versions (old, new) and close it.


    Open the .NET project and still the same issue. Pls need some help!

  • Replied 8 September 2017, 1:03 pm EST

    Value cannot be null. Parameter name: value.RangeGroupModel


    I changed the Lisence file in our project to reference to 4.0 and it worked only for few forms and for some forms it gave the above error.

  • Replied 8 September 2017, 1:03 pm EST

    Hello,


    Without a project reproducing this issue for us to debug, I can not say for sure what may be happening. I would suggest going back to the previous version so you can load your form with the Spread on it that is causing this issue. Then use Spread Designer to save the design time settings to an XML file. Then upgrade the project again and comment out the line of code causing the issue for you. If yuo did not make any changes at design time, you can just leave the code like that and continue on. If you had made changes to Spread Designer, then after commenting out this line, open Spread Designer and load the XML file you had saved previous and apply that to the Spread to see if the seriailized data now works to compile and run.

Need extra support?

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

Learn More

Forum Channels