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. Image for the cookie policy date

Children of a grid

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

2 Replies

AD Administrator Syncfusion Team April 19, 2005 08: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


ST Steve April 20, 2005 08: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

Loader.
Live Chat Icon For mobile
Up arrow icon