AD
Administrator
Syncfusion Team
September 21, 2006 07:46 AM UTC
Hi Andreas,
1. In the Form Load, call the ResizeToFit() method to make all the column widths get adjusted to its cell contents.
this.gridGroupingControl1.TableModel.ColWidths.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.IncludeHeaders);
2. Try the code below in the TableControlCurrentCellChanged event handler to dynamically adjust the column width while entering text.
//
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
this.gridGroupingControl1.TableModel.ColWidths.ResizeToFit(cc.RangeInfo, GridResizeToFitOptions.None);
//
Let me know if this helps for you.
Regards,
Rajagopal
AD
Administrator
Syncfusion Team
September 22, 2006 06:19 AM UTC
That works perfectly!
Many thanks
Andreas
AG
Andreas Gfeller
September 22, 2006 06:20 AM UTC
That works perfectly!
Many thanks
Andreas