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.

How to anchor a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

28585 May 4,2005 08:09 PM May 4,2005 09:00 PM Windows Forms 4
loading
Tags: GridControl
John Dumais
Asked On May 4, 2005 08:09 PM

Hi, How do you set the anchor ehavior of a GridControl? When I drop one on a form, then set the anchor to all4 sides, I would have expected the GridControl to resize when I resize the form. However, the GridControl deosn''t seem to be effected by the anchor styles -- it doen''t resize as I would expect. Thanks,

Administrator [Syncfusion]
Replied On May 4, 2005 08:14 PM

The Anchor property on the GridControl should behave the same as on any other Control. Check to make sure the Dock property is not also set. If it is, it will override the Anchor settings. Check what the grid''s parent is? The anchoring of a control is to its parent''s bounds. If this does not explain what you are seeing, can you upload a sample project showing the problem?

John Dumais
Replied On May 4, 2005 08:28 PM

It doesn''t look like the dock proprty is set. I''ll attach a very simple solution. Grab the for and resize it. Thanks, >The Anchor property on the GridControl should behave the same as on any other Control. > >Check to make sure the Dock property is not also set. If it is, it will override the Anchor settings. > >Check what the grid''s parent is? The anchoring of a control is to its parent''s bounds. > >If this does not explain what you are seeing, can you upload a sample project showing the problem? Dorkin3_6314.zip

Administrator [Syncfusion]
Replied On May 4, 2005 08:50 PM

In your sample, the grid is sizing for me. Add a BorderStyle property to the grid and it will be more obvious that the grid bounds are changing as your size the form. Are you expecting the columns in the grid to resize as you resize the form? If so, you will have to handle grid.Model.QueryColWidth event to manage this. You can see a sample of this in \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\DataBound\GridDataBoundImageCell.

John Dumais
Replied On May 4, 2005 09:00 PM

Ah. Thanks.

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.

;