FormatException on CheckBoxCellType after migrate from 2.0 to 2.5

Posted by: marcv on 8 September 2017, 12:48 pm EST

  • Posted 8 September 2017, 12:48 pm EST

    Hi,

    We are using VS2003 with 1.1 framework and our software is working pretty well with the Spread for Winforms 2.0. As we 'd like to get fixes about some old bugs, we try to migrate to 2.5 and we have some exceptions when we try to enable/disable checkbox in cells with the command :

    spdArticles_Sheet1.Cells[i,COL_SEL_ARTICLE].Value = true;

    Is there a migrate user's guide or some changes to do when migrating from 2.0 to 2.5 with VS2003 and framework 1.1 ?

    Thanks

    Marc
  • Replied 8 September 2017, 12:48 pm EST

    Marc,


    Are you trying to enable/disable the checkbox, or just check/uncheck the checkbox programatically with your code? What exception(s) are you seeing? You should be able to use the same code with both versions of Spread for Windows Forms. Could you post a small zipped project reproducing this behavior for us to debug?

  • Replied 8 September 2017, 12:48 pm EST

    Scotts,

    I just try to check/uncheck the checkbox with my code (the spread is not visible at that moment) and the FormatException raises (incorrect input string format). It works fine when I put a string in a standard cell.

    Thanks for your help

    Marc
  • Replied 8 September 2017, 12:48 pm EST

    Marc,


    Here is code where I create a FpSpread object, set the CellType to CheckBoxCellType and set the Value for some cells. Then, I add the FpSpread object to the Controls collection of the form and make it Visible. I do not see any exception. Could you test my code and see what is different from your code?

     
    		Dim ss As New FarPoint.Win.Spread.FpSpread
    ss.Width = 400
    ss.Height = 400
    ss.Sheets.Count = 1
    Dim c As New FarPoint.Win.Spread.CellType.CheckBoxCellType
    ss.Sheets(0).Columns(1).CellType = c
    For i As Integer = 0 To 100
    If i Mod 3 Then
    ss.Sheets(0).Cells(i, 1).Value = True
    End If
    Next

    Me
    .Controls.Add(ss)
    ss.Visible = True
     
Need extra support?

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

Learn More

Forum Channels