.Net Spread 4.0.3526.2008 issue

Posted by: dotnetuser on 8 September 2017, 2:30 pm EST

  • Posted 8 September 2017, 2:30 pm EST

    Been waiting for a long time for a new spread release to fix some of the issues.


    Last one downloaded 4.0.3522.2008 to find that it has issues and had to roll it back to the current release 4.0.3509.2008 that it seems we're NOT able yet to go beyong because of problems in newer releases.


    Here is how to duplicate the issue.


    Using VS 2008 create a new project with a main MDI parent screen and mdi child.


    Drop a button in the MDI parent screen to call the MDI child or a menu and make sure that the MDIparent   is set to the main screen before displaying it.


    In the load event of the child screen form1 put the following  code to format/load the spread:


    private void Form1_Load(object sender, EventArgs e)


    {


     


    fpSpread1.Sheets[0].RowCount = 0;


    fpSpread1.Sheets[0].ColumnCount = 4;


    fpSpread1.Sheets[0].Columns[0].Label = "text1";


    fpSpread1.Sheets[0].Columns[0].CellType = new FarPoint.Win.Spread.CellType.TextCellType();


    fpSpread1.Sheets[0].Columns[1].Label = "text2";


    fpSpread1.Sheets[0].Columns[1].CellType = new FarPoint.Win.Spread.CellType.TextCellType();


    fpSpread1.Sheets[0].Columns[2].Label = "Combo";


    fpSpread1.Sheets[0].Columns[2].CellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType();


    fpSpread1.Sheets[0].Columns[3].Label = "CheckBox4";


    fpSpread1.Sheets[0].Columns[3].CellType = new FarPoint.Win.Spread.CellType.CheckBoxCellType();


    ((FarPoint.Win.Spread.CellType.CheckBoxCellType)fpSpread1.Sheets[0].Columns[3].CellType).ThreeState = false;


    fpSpread1.Sheets[0].Columns[3].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;


    fpSpread1.Sheets[0].SetColumnWidth(0, 150);


    fpSpread1.Sheets[0].SetColumnWidth(1, 150);


    fpSpread1.Sheets[0].SetColumnWidth(2, 150);


    fpSpread1.Sheets[0].SetColumnWidth(3, 150);


    fpSpread1.SuspendLayout();


    fpSpread1.Sheets[0].RowCount = 0;


    fpSpread1.Sheets[0].ColumnCount = 4;


     


    for (int ii = 0; ii < fpSpread1.Sheets[0].ColumnHeader.RowCount; ii++)


    {


    fpSpread1.Sheets[0].ColumnHeader.Rows[ii].Resizable = true;


    }


    fpSpread1.Sheets[0].RowCount = fpSpread1.Sheets[0].RowCount + 1;


    fpSpread1.Sheets[0].Cells[0, 0].Text = "Text 1";


    fpSpread1.Sheets[0].Cells[0, 1].Text = "Text 1";


    fpSpread1.Sheets[0].Cells[0, 3].Value = 1;


    fpSpread1.Sheets[0].RowCount = fpSpread1.Sheets[0].RowCount + 1;


    fpSpread1.Sheets[0].Cells[1, 0].Text = "Text 2";


    fpSpread1.Sheets[0].Cells[1, 1].Text = "Text 2";


    fpSpread1.Sheets[0].Cells[1, 3].Value = 0;


    fpSpread1.Sheets[0].RowCount = fpSpread1.Sheets[0].RowCount + 1;


    fpSpread1.Sheets[0].Cells[2, 0].Text = "Text 3";


    fpSpread1.Sheets[0].Cells[2, 1].Text = "Text 3";


    fpSpread1.Sheets[0].Cells[2, 3].Value = 0;


    fpSpread1.Sheets[0].RowCount = fpSpread1.Sheets[0].RowCount + 1;


    fpSpread1.Sheets[0].Cells[3, 0].Text = "Text 4";


    fpSpread1.Sheets[0].Cells[3, 1].Text = "Text 4";


    fpSpread1.Sheets[0].Cells[3, 3].Value = 1;


    fpSpread1.Sheets[0].SetActiveCell(0, 3);


    fpSpread1.ResumeLayout();


     


    }


    Now in the fpSpread1_ButtonClicked Event add the  the following code that does nothing but change the backcolor of the checkbox to red then back to white:


     


    private void fpSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)


    {


    fpSpread1.Sheets[0].Cells[0, 3].BackColor = Color.Red ;


    fpSpread1.Sheets[0].Cells[0, 3].BackColor = Color.White;


    fpSpread1.Sheets[0].Cells[1, 3].BackColor = Color.Red;


    fpSpread1.Sheets[0].Cells[1, 3].BackColor = Color.White;


    fpSpread1.Sheets[0].Cells[2, 3].BackColor = Color.Red;


    fpSpread1.Sheets[0].Cells[2, 3].BackColor = Color.White;


    fpSpread1.Sheets[0].Cells[3, 3].BackColor = Color.Red;


    fpSpread1.Sheets[0].Cells[3, 3].BackColor = Color.White;


     


    }


    Now run the application and try to check/uncheck the checkboxes you can see when you click it change the value but when you release the mouse button it's reverting to the original value again.


    We had issues when changing the backcolor of a checkbox it was triggering the buttonclickevent automatically but we couldn't reproduce the issue with a sample project.


    This above is a sample to proove there is something wrong with this spread release.


    We've been waiting for long and we need a working version of the spread or a workaround. 


     


     


     

  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    In order to change the backcolor of the checkbox cell type on ButtonClicked event you can simply use the below mentioned code for the same and it will preserve the value as well on clicking the checkbox cell. Please have a look at the code and lemme know if it helps you.

    void fpSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)

            {

                e.EditingControl.BackColor = Color.Red;

            }

    Thanks.

  • Replied 8 September 2017, 2:30 pm EST

    1) Changing the backcolor or the checkboxes shouldn't  affect the value. So it's a bug?


    2) The backcolor is not necessarely wan to change the backcolor on the button click. it can be done on the leavecell and in other events.


    3) This behavior was NOT happening in release 4.3509.2008... beleive this has been introduced in this release.


     


     


     


     


     

  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    Yes, I am able to see the difference in working using build release 4.0.3509.2008 and also using the latest build and have reported it as a bug in the latest build of Spread and the bug number for the same is #99919082. It will be fixed in the future maintenance build of Spread.

    Thanks.

  • Replied 8 September 2017, 2:30 pm EST

    What would be the next release ETA?
  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    We have just released the maintenance build for Spread v4, the next build will possibly be out after 4 months.

     

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels