The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team February 4, 2003 09:06 PM UTC
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 09:53 PM UTC
Can you point me to a code fragment that illustrates how to do this? Thanks.
ADAdministrator Syncfusion Team February 5, 2003 06:30 AM UTC
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.