We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

double click resize to fit

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?

1 Reply

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

Loader.
Live Chat Icon For mobile
Up arrow icon