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.
Doese someone knows, how i can force the GridControl to automatically fit the size of all Columns to the size of the Gridcontrol. So if the customer change the size of the grid, the columns where automatically fitted.
RCRajadurai C Syncfusion Team July 6, 2009 12:55 PM UTC
Hi Maytree,
Thanks for your interest in Syncfusion Products.
To resize the column width according to the grid' clientsize, try to handle the QueryColWidth event and set width for each column. This event get triggered each time, the column width is queried. Please refer to the following code. void gridControl1_QueryColWidth(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e) { if (e.Index > 0) { int clientwidth = this.gridControl1.ClientRectangle.Width - (this.gridControl1.Model.ColWidths[0]); e.Size = (int)(clientwidth / (float)this.gridControl1.Model.ColCount); e.Handled = true; this.gridControl1.Invalidate(); } }