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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to anchor a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

28585 May 5,2005 12:09 AM UTC May 5,2005 01:00 AM UTC WinForms 4
loading
Tags: GridControl
John Dumais
Asked On May 5, 2005 12:09 AM UTC

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 5, 2005 12:14 AM UTC

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 5, 2005 12:28 AM UTC

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 5, 2005 12:50 AM UTC

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 5, 2005 01:00 AM UTC

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.

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

;