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.
Syncfusion Feedback

Custom Cell Controls - what events cause them to move??

Thread ID:

Created:

Updated:

Platform:

Replies:

49512 Sep 20,2006 01:47 PM UTC Sep 22,2006 02:37 PM UTC Windows Forms 3
loading
Tags: GridControl
Colin
Asked On September 20, 2006 01:47 PM UTC

I am using a custom cell in a grid and I am wondering when the controls used to render the cells are moved.

To demonstrate the problem I have attached an example project of what I am trying to do. There are two cells with my custom control in. Clicking on one of them will display a drop down list. With the list displayed I want to be able to click on the second and see the drop down list of the first dissappear and the drop down list for the second appear in the right place.

I have copied the implementation found in the calendar example and have one active control and one control to paint the inactive cells.

In this example this is what happens but when I use this in my application strange things occur. The attached project prints to the debug window when things happen and we see the following:

X = -1000
Y = -1000
on activate 2 3
painting the combo box control Click here!
X = 300
Y = 38
painting the combo box control Click here!
painting the combo box control Click here!
painting the item Folder
painting the item Folder
painting the item Folder

the active control is moved to -1000,-1000. The cell is activated, the active contrl is move to the correct position, the ''Click Here!'' is painted, the folder menu items are painted.

This is good. However, using the same code in a large application I get the following output:

X = -1000
Y = -1000
on activate 2 2
X = 100
Y = 38
painting the combo box control Click here!
painting the combo box control Click here!
X = -1000 **********
Y = -1000 **********
painting the menu item stored value Folder
painting the menu item stored value Folder
painting the menu item stored value Folder
X = 100
Y = 38
painting the combo box control Click here!

It is the two lines with ****** that confuse me. The active control is moved to -1000,-1000 while the folder menu items are painted and then returned back to correct position. Obviously this does not look good!

My question is what can possibly trigger this to happen. The design of the product is complex and it is likely there are some events and messages being fired that I can''t see but I can not work out what would cause the active control to be moved like this.

Any ideas?????


Colin

comboMenu.zip

Administrator [Syncfusion]
Replied On September 21, 2006 01:00 PM UTC

Hi Colin,

Sorry for the inconvenience caused.

We are looking into this issue and get back to you very soon.

Thanks for your patience.

Regards,
Haneef

Colin Bolton
Replied On September 21, 2006 04:54 PM UTC

Cool, thanks.

In my application I''ve tried putting the syncfusion on a plain old form and it works fine in this case. Sadly, after a convert from MFC to WinForms, there is no such thing as a simple form anymore and I suspect there''s an external message coming in to upset the table. Does this sound likely or am I looking at a blind alley??

Cheers!

Colin

Colin
Replied On September 22, 2006 02:37 PM UTC

Got it!!

Don''t hook anything into the syncfusion table''s onMouseEnter method, especially anything that gives the table focus as this messes things up.

Also if using the two control trick, do not re-initialise the active control in the onDraw event each time, do it once in the onActivated event and then leave it be.

Phew, that took a while to work out!



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.

Warning Icon 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.Close Icon

;