AD
Administrator
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;
}
}