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.

Children of a grid

Thread ID:





27889 Apr 19,2005 06:40 PM Apr 20,2005 09:23 AM Windows Forms 2
Tags: GridControl
Asked On April 19, 2005 06:40 PM

Please see the attached zip file. I have created a user control and added to the controls collection of a grid. When placing this control on the grid I would like it to appear behind the row and column headers. To duplicate, run the example and press the up arrow button 4 or 5 times and you will notice that the red control goes into the header row. I would like to prevent this if at all possible. The reason I ask is because I am simulating Excel''s chart that is embedded in the spreadsheet itself. I have created a control that host a graph/chart that is a child of the spreadsheet. Please Advise. Thanks, Steve SFTrans_7018.zip

Administrator [Syncfusion]
Replied On April 19, 2005 09:02 PM

This is tricky. The Frameworks handles the drawing of a parent control''s children and they are clipped at the parent bounds. That is why your usercontrol scrolls up over the header rows as the they are included in the grid bounds. One way around this problem is to parent the usercontrol to a panel, and then parent the panel to the grid. Then scroll the panel as long as you want thing fully visible. But when the panel hits the header row, to not scroll the panel, but instead shrink its height and scroll the usercontrol. The panel will not move so it will not go over the header row, but the user control will scroll up and be clipped at the panel''s bounds which are forced to be ah the edge of the header row. Here is your sample back modified to show this idea. http://www.syncfusion.com/Support/user/uploads/SFTrans_7b234019.zip

Replied On April 20, 2005 09:23 AM

Thanks Clay! I was actually looking at scrolling the image manually with API''s but your solution is much cleaner. Thanks Again! Steve


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.