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.
Hi.
What event should I handle to autosize virtual grid? Somthing like "AfterGridDraw".
When I try to
this.gridControl1.Model.ColWidths.ResizeToFit(GridRangeInfo.Col(e.ColIndex),GridResizeToFitOptions.IncludeHeaders);
in QueryCellInfo handler I have an exception (about recursive calling of QueryCellInfo).
How can I resize colWidths by width of word in header?
Thanks
STstanleyj Syncfusion Team November 9, 2005 11:42 AM UTC
Hi Andrew,
You can make use of ResizeToFit in the Form_Load or in the constructor after the initial call and run of the ResetVolatileData function. To resize the columns only by the width of the word in the header, try this code given below.
this.gridControl1.Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0));
Trying to use such code in the QueryCellInfo handler will result in a recursive call.
Best regards,
Stanley