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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Children of a grid

Thread ID:





27889 Apr 19,2005 10:40 PM UTC Apr 20,2005 01:23 PM UTC WinForms 2
Tags: GridControl
Asked On April 19, 2005 10:40 PM UTC

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 20, 2005 01:02 AM UTC

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 01:23 PM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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