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.
When I double click the border between two columns to resize the column to fit the largest cell, it seems to only check currently visible data (not data scrolled off the screen)
Additionally, if I select the whole grid (by clicking on the upper left corner of the grid) it resizes only the columns that are visible by the size of the largest visible cell in that column.
Is this a bug or a feature?
Is there an option to have it check the whole table?
ADAdministrator Syncfusion Team February 5, 2004 09:00 PM UTC
Sizing the visible area is by design. If you have a grid with thousands of rows, then sizing the whole grid will take significant time.
If you want to size the all the cells in a column, then you can handle the ResizingColumns event and size things there yourself.
private void grid_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
{
if (e.Reason == GridResizeCellsReason.DoubleClick)
{
GridRangeInfo columns = grid.Selections.Ranges.GetRangesContaining(e.Columns).ActiveRange.UnionRange(e.Columns);
grid.Model.ColWidths.ResizeToFit(columns, GridResizeToFitOptions.IncludeHeaders);
e.Cancel = true;
}
}