Hi Christian,
Thanks for using Syncfusion Products.
Yes, there is possibility to call resizetofit on columns and consider only the visible rows to measure column widths by passing the last visible row index and topmost row
index as arguments to ResizeToFit method. Please, refer the sample attached for its implementation and for additional GridGrouping Control optimization settings:
this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Rows(this.gridGroupingControl1.TableControl.TopRowIndex, this.gridGroupingControl1.TableControl.ViewLayout.LastVisibleRow));
Please find the sample from the following link in which this code has been implemented.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=ResizeWidth_GGC-235102608.zipAdditionally to optimize the grid performance , you may set the following settings as shown below :
This optimization setting will help you to enhance the performance of the GridGrouping Control by utilizing less memory and so on.
// This will ensure that grid's painting routine draw all the cells with same background at one time rather than one cell at a time.
this.gridGroupingControl1.TableControl.OptimizeDrawBackground = true;
// This ensures the better memory utilization
this.gridGroupingControl1.CounterLogic = EngineCounters.YAmount;
this.gridGroupingControl1.AllowedOptimizations = EngineOptimizations.DisableCounters | EngineOptimizations.RecordsAsDisplayElements;
// Scrollwindow will cause immediate update.
this.gridGroupingControl1.InsertRemoveBehavior = GridListChangedInsertRemoveBehavior.ScrollWithImmediateUpdate;
this.gridGroupingControl1.SortPositionChangedBehavior = GridListChangedInsertRemoveBehavior.ScrollWithImmediateUpdate;
this.gridGroupingControl1.Engine.InvalidateAllWhenListChanged = false;
Please, do let me know if you have any query.
Regards
Ranjeet