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.

Interop question

Thread ID:

Created:

Updated:

Platform:

Replies:

93541 Mar 18,2010 04:08 PM Mar 25,2010 11:56 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 18, 2010 04:08 PM

I am using the grid control on a form VS2008 that I make into an Interop Control for VB6. The top level events like adding controls to the cell types, and any event handlers that I program fire just fine(I have a right mouse click event that fires a drop down menu and everything works.

The problem is when a rich text editor is launched by clicking the button(another working event) it launches, and the cancel button closes the control(another working event), but the save button does not write the value back to the cell, and opening the editor again the typed text is not present. The same thing happens for a calendar control on the grid. I am able to change months, years, and when a date is selected the calendar control closes, but the value is not written to the cell. A calendar control off of the grid works wonderfully, it is just the inherent cell type control event args I cant get to bubble up.

All of this works fine inside my test container when I am developing, but adding the control to the VB.6 form and running it loses those built in events in the control. Has anyone done any interop work or testing on this control? Do I need to write my own custom events and overide the internal ones? Does anyone have any idea how to do this? I am so close to getting this to do what I need it to it is sickening if I have to find another solution.

On an interop note I have referenced both the control, and added the reference to the .tlb in the project.

George

Administrator [Syncfusion]
Replied On March 18, 2010 05:47 PM

Is the essential grid a C# assembly? So this would apply, so I would need to add additional wrappers to my project?

"To be specific, the VB compiler creates additional code in IL to make a VB class's events and properties visible in VB6, while the C# compiler does not. I had written the original templates with the assumption that the two compilers would write similar IL -- because of this faulty assumption, the events thrown in a C# UserControl were never received in VB6. This has been corrected in the updated C# templates by including in C# the extra attributes and interfaces required to make the events visible -- interfaces which the VB compiler automatically creates for you in IL."

Could this be the reason the save events are not firing for the grid cell controls?

Administrator [Syncfusion]
Replied On March 19, 2010 03:42 PM

Going to stand alone .Net exe so never mind. :-D

Rajadurai C [Syncfusion]
Replied On March 25, 2010 11:56 PM

Hi George,

Thanks for your update.

Regards,
Rajadurai

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.

;