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

Auto Resize in Grid.Grouping Control

Hi, I am using a Grid Grouping control and i want to have whenever a column is resized if the tex is of more length the text should get wrapped and the row height should automatically incresed. I tried using grdCallSheet.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Table() , GridResizeToFitOptions.None) but its not working there is a similar kind of example in the forum for gridDataBoundGrid for this its working, but for Grid.Grouping control its not working. Please let me know how it can be possible. Ajay

4 Replies

AD Administrator Syncfusion Team June 16, 2006 04:01 AM UTC

Hi Ajay, The Attached sample demonstrates the feature resizing individual rows in the grid. It also implements the IGridRowHeight interface and its routines for getting,setting and preventing row height for elements. Please find the sample below. Here is a sample For more details, See the ResizableRows browser sample. Syncfusion\Essential Studio\4.2.0.37\windows\Grid.Grouping.Windows\Samples\ResizableRows\ Let me know if you need any further assistance. Best Regards, Haneef


AD Administrator Syncfusion Team June 16, 2006 09:38 AM UTC

Hi Haneef, I tried of this example but in this whenever we have to change the height manually then only it wordwraps but i require wordwrap to happen when column width is reduced it should automatically increase the height Ajay


AD Administrator Syncfusion Team June 16, 2006 10:08 AM UTC

Hi Ajay, Try this code in form''s load event. Please find the code snippet below. this.gridGroupingControl1.TableDescriptor.AllowCalculateMaxColumnWidth = false; this.gridGroupingControl1.TableControl.WantEnterKey = false; this.gridGroupingControl1.TableControl.AllowTextBoxAutoSize = true; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.WrapText = true; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.AutoSize = true; GridTableModel tm = this.gridGroupingControl1.TableModel ; tm.RowHeights.ResizeToFit(GridRangeInfo.Table() , GridResizeToFitOptions.ResizeCoveredCells); Let me know if this helps. Best Regards, Haneef


AD Administrator Syncfusion Team June 19, 2006 02:22 PM UTC

Hi Haneef, This too does''nt work out. Thanks & Regards Ajay

Loader.
Live Chat Icon For mobile
Up arrow icon