ADAdministrator Syncfusion Team February 4, 2003 04:06 PM
There is no GridDataBoundGrid specific property to handle sizing. But you can use the Control inherited Anchor to allow the grid to resize as you resize the parent form.
BKBill KorchinskiFebruary 4, 2003 04:53 PM
Can you point me to a code fragment that illustrates how to do this? Thanks.
ADAdministrator Syncfusion Team February 5, 2003 01:30 AM
Most of the time you do this in the designer. Just click on the grid, and then set the Anchor property in the property grid by clicking on the little diagram that appears. If you anchor the grid to all four sides, it will keep fixed distances from the sides as you size the form.
Form code, you would do something like:
this.gridControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
If your form has other controls on it, and you anchor the grid on all four side, any controls below or to the right should be re-anchored to the bottom-right. The default setting anchors all controls to the top-left of a form.
Or, if your grid occupies the whole form, you can just set its DockStyle property to Fill, and it will always fill the form's client area as you size the form.