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,
I am removing and inserting the columns.for the newly inserted columns ,width becomes very less.
I am trying resizeToFit in the Model_QueryColWidthEvent but now helping.
Which method should be used and where it should be called?
ADAdministrator Syncfusion Team December 14, 2004 08:22 AM UTC
After you insert your columns, try calling grid.Model.ResetVolatileData and then call resizetofit.
If that does not work, after you insert your columns, try calling grid.Refresh and then resizetofit.
ADAdministrator Syncfusion Team December 15, 2004 12:19 AM UTC
I tried both the options it is not working.
When i load the grid for the first time
i called following.For the first time its working and same method i called after insert columns its not working.
this.m_PretestListingGrid.Model.ColWidths.ResizeT
oFit(
GridRangeInfo.Row(0));
>After you insert your columns, try calling grid.Model.ResetVolatileData and then call resizetofit.
>
>If that does not work, after you insert your columns, try calling grid.Refresh and then resizetofit.
ADAdministrator Syncfusion Team December 15, 2004 08:10 AM UTC
If you are trying to resize headers (you listed row 0 in your call), then you need to make sure you use the IncludeHeaders resize option.
Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.IncludeHeaders);