The hidden column appears after a resize

Posted by: david on 16 April 2024, 2:21 am EST

  • Posted 16 April 2024, 2:21 am EST

    Hello

    (((Spread Winforms - Spread version 15.0.20225.0 - MS Framework 4.6.2 - Visual Studio 2019)))

    If I hide a column and resize it, it reappears.

    Attached an example program (I deleted the license file in Zip file).

    1° Click button “Init”

    2° Click button “Hide Col (2]” (column(2] disappears)

    3° Click button resize (colmun[2] resize and reappears)

    Then if you hide column 2 again and then resize it, the column remains hidden.

    The problem therefore only occurs at the first iteration

    thksTestSpreadVisible.zip

  • Posted 16 April 2024, 8:37 pm EST - Updated 16 April 2024, 8:43 pm EST

    Hi David,

    Thanks for providing the sample application with environment details.

    This seems to be a bug with Spread.NET version 15 control. The issue is not replicable with the latest version of the spread control, i.e., v17.0.20242.0. Refer the following GIF:

    However, you can consider a workaround to set second column’s visibility to true before changing its width as shown below [for v15] :

    // Resize column
    private void BtnResize_Click(object sender, EventArgs e)
    {
        fpSpread1_Sheet1.Columns[2].Visible = true;
        fpSpread1_Sheet1.Columns[2].Width = 200;
        // idem if resize all colums fpSpread1_Sheet1.Columns[0, fpSpread1_Sheet1.Columns.Count - 1].Width = 50;
    }

    Kindly refer to the attached sample for full implementation. See TestSpreadVisible_Mod.zip

    Please note that this forum is specific to ComponentOne WinForms related queries. You can post your Spread.NET WinForms related queries on its particular forum: https://developer.mescius.com/forums/spread-winforms

    Thanks & Regards,

    Aastha

Need extra support?

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

Learn More

Forum Channels