Update from Spread for WinForms 4 to Spread for WinForms 12

Posted by: j.asimbaya on 21 January 2019, 5:06 pm EST

    • Post Options:
    • Link

    Posted 21 January 2019, 5:06 pm EST

    I am upgrading from VS2005, spread for Windows Forms 4.0.3501.2008 to VS2017 with spread for Windows Forms 12.45.20181.0. When updating the references and compiling, the following errors appear:

    EnhancedColumnHeaderRenderer’ does not contain a definition for ‘BackColor’ and no accessible extension method ‘BackColor’ accepting a first argument of type ‘EnhancedColumnHeaderRenderer’ could be found (are you missing a using directive or an assembly reference?)

    EnhancedColumnHeaderRenderer’ does not contain a definition for ‘ForeColor’ and no accessible extension method ‘ForeColor’ accepting a first argument of type ‘EnhancedColumnHeaderRenderer’ could be found (are you missing a using directive or an assembly reference?)

    EnhancedColumnHeaderRenderer’ does not contain a definition for ‘RightToLeft’ and no accessible extension method ‘RightToLeft’ accepting a first argument of type ‘EnhancedColumnHeaderRenderer’ could be found (are you missing a using directive or an assembly reference?)

    The code is the following:

    FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer enhancedColumnHeaderRenderer1 = new FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer();

    enhancedColumnHeaderRenderer1.BackColor = System.Drawing.SystemColors.Control;

    enhancedColumnHeaderRenderer1.Font = new System.Drawing.Font(“Microsoft Sans Serif”, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

    enhancedColumnHeaderRenderer1.ForeColor = System.Drawing.SystemColors.ControlText;

    enhancedColumnHeaderRenderer1.RightToLeft = System.Windows.Forms.RightToLeft.No;

    Do you have a reference guide to update from previous versions?

  • Posted 22 January 2019, 2:28 am EST

    Hello,

    It’s an old issue and our developers have also confirmed that though it cause breaking changes but it’s intended behavior.

    The reason is that in old version, EnhancedColumnHeaderRenderer inherits from FpButton (by accident) and it caused memory leak. Actually, those properties (BackColor, ForeColor, Font, RightToLeft etc. ) are from FpButton and it doesn’t get used by EnhancedColumnHeaderRenderer for any purpose.

    Hence, in order to fix your issue, you will have to remove all the lines of code which refers to those properties and are throwing error in your v12 application as it won’t make any change from the run-time behaviors.

    Hope it clarifies.

    Thanks,

    Reeva

Need extra support?

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

Learn More

Forum Channels