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.
The grid control is the only control I have on the form. I want the grid control to fill the form. I have set dock style to fill but when I run it doesn''t resize to fill the window. What else do I have to do to make a grid fill the form?
ADAdministrator Syncfusion Team February 19, 2004 11:55 AM UTC
Docking the grid in a form will only change the grid''s clientarea/bounds as you size the form. If you want the column widths and row heights to change so the whole client area of the grid is occupied by grid cells, then you should handle the QueryRowHeights and QueryColWidths events and dynamically set the height/width of the requested row/column based on the clientsize.
Take a look at this sample, Syncfusion\Essential Suite\Grid\Samples\DataBound\GridDataBoundImageCell. It shows the grid dynamically changing colwidths/rowheights as you size the form.
ADAdministrator Syncfusion Team February 23, 2004 12:56 AM UTC
Thanks for the pointer. This helped a lot. The only issue with column resizing I haven''t been able to get working is by default a column can be hidden from view by dragging its width to 0, how can I prevent this but still let the user resize a column? I would also not like them to be able to resize a column so that the scroll bar would have to be used to view the column.
thanks
>Docking the grid in a form will only change the grid''s clientarea/bounds as you size the form. If you want the column widths and row heights to change so the whole client area of the grid is occupied by grid cells, then you should handle the QueryRowHeights and QueryColWidths events and dynamically set the height/width of the requested row/column based on the clientsize.
>
>Take a look at this sample, Syncfusion\Essential Suite\Grid\Samples\DataBound\GridDataBoundImageCell. It shows the grid dynamically changing colwidths/rowheights as you size the form.
ADAdministrator Syncfusion Team February 23, 2004 05:33 AM UTC
If you want to prevent your user from sizing a column to width zero, then you can cancel the resize by handling the RsizingColumns event.