We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Upgrading from 1.1 to 2.0 .net framework

Thread ID:

Created:

Updated:

Platform:

Replies:

62202 Jun 10,2007 07:15 AM Jun 11,2007 07:07 AM Windows Forms 3
loading
Tags: GridControl
Maxim Software Systems
Asked On June 10, 2007 07:15 AM

We are in the process of upgrading our current projects from VS2003 to VS2005 and are currently working with v3.3.0.0 of the Syncfusion Grid.

After moving a project to VS2005, the 1.1 .net framework versions of the grid libraries cause "stack imbalance" exceptions. Of course, it makes sense to change the Syncfusion references to the 2.0 .net framework versions, which I did by removing the 1.1 references and replacing them with the 2.0 references.

Unfortunately, we're getting strange exceptions now, like: "Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.GridBaseStyle' to type 'Syncfusion.Windows.Forms.Grid.GridBaseStyle'." during the initialization of a form that has a grid on it (the full exception is at the end of this message).

Is there some special process for switching from the 1.1 to the 2.0 framework versions of the Syncfusion libraries?


--------------------------------

Example error that appears after replacing 1.1 with 2.0 .net framework versions of the grid dlls:

An error occurred while trying to show the Main screen.

Error : Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.GridBaseStyle' to type 'Syncfusion.Windows.Forms.Grid.GridBaseStyle'.
Source : Syncfusion.Grid.Windows
Reflected Type : GridBaseStylesMap
Target Site : get_Item

-- Stack Trace --
Error at : Syncfusion.Windows.Forms.Grid.GridBaseStylesMap.get_Item(String name)

Error at : Syncfusion.Windows.Forms.Grid.GridBaseStylesMap.GetBaseStylesMapStyles(String name, Int32& level)

Error at : Syncfusion.Windows.Forms.Grid.GridVolatileData.GetBaseStylesMapStyles(String name, Int32& level)

Error at : Syncfusion.Windows.Forms.Grid.GridVolatileData.GetBaseStyles(GridStyleInfo thisStyleInfo, Int32 rowIndex, Int32 colIndex)

Error at : Syncfusion.Windows.Forms.Grid.GridStyleInfoIdentity.GetBaseStyles(IStyleInfo thisStyleInfo)

Error at : Syncfusion.Styles.StyleInfoIdentityBase.GetBaseStyle(IStyleInfo thisStyleInfo, StyleInfoProperty sip)

Error at : Syncfusion.Styles.StyleInfoBase.IntGetDefaultStyleInfo(StyleInfoProperty sip)

Error at : Syncfusion.Styles.StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty sip)

Error at : Syncfusion.Styles.StyleInfoBase.GetValue(StyleInfoProperty sip)

Error at : Syncfusion.Windows.Forms.Grid.GridStyleInfo.get_CellType()

Error at : Syncfusion.Windows.Forms.Grid.GridControlBase.RaisePrepareViewStyleInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style)

Error at : Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo)

Error at : Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex)

Error at : Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options, Boolean discardChanges)

Error at : Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex)

Error at : MaximControls.MaximGridControl.Refresh(Boolean fromModel)

Error at : Syncfusion.Windows.Forms.Grid.GridControlBase.Refresh()

Error at : Syncfusion.Windows.Forms.Grid.GridControlBase.PropertiesChanged(Object sender, EventArgs e)

Error at : System.EventHandler.Invoke(Object sender, EventArgs e)

Error at : Syncfusion.Windows.Forms.Grid.GridProperties.OnChanged()

Error at : Syncfusion.Windows.Forms.Grid.GridProperties.set_RowHeaders(Boolean value)

Error at : MyForm.InitializeComponent()
line # : 467

Maxim Software Systems
Replied On June 11, 2007 05:58 AM

Silly me. The project this exception was seen in was using an extended grid class which was defined in another project which was still referencing the 1.1 dlls. I updated that project and the errors all went away.


Maxim Software Systems
Replied On June 11, 2007 06:03 AM

I may have spoken too soon. Thought the previous exceptions no longer appear, I'm getting the PInvokeStackImbalance errors again now like I was back when all the Syncfusion dlls were the 1.1 .net framework ones.

--------------------

PInvokeStackImbalance was detected
Message: A call to PInvoke function 'Syncfusion.Shared.Base!Syncfusion.Runtime.InteropServices.NativeMethods::ImageList_DrawEx' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

Maxim Software Systems
Replied On June 11, 2007 07:07 AM

Upgrading to th 5.102.0.51 version of the Syncfusion Studio appears to have solved all my problems.

I hope this little adventure will be useful to others. :)

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;