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

Size of rows

Is there any easy way to make that when a cell has a very long text (or more than one), the texts wraps to make all table visible in the Grid?
Or is there any option to automatically accomodate size of columns and rows so the user wouldn''t need to use the horizontal scrollbar except when it''s really neccessary?

Thanks in advance

1 Reply

AD Administrator Syncfusion Team August 28, 2006 10:09 AM UTC

Hi Alejandro,

By default, the GridGroupingControl does not support rows with individualized rowheights. To get this support, you need to add a custom GridEngine as in this sample.
Essential Studio\4.2\Windows\Grid.Windows\Samples\Grouping\ResizableRows

If you want the cell to grow as the user types, then you can set the style.AutoSize property to true and the style.WrapText to true. Also set the AllowTextBoxAutoSize property to true.

If you want to auto size it when the cell is not editable or user not typing, then you can explicitly call the ResizeToFit() method.

this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit( GridRangeInfo.Row(4) ); // resizes row 4
this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit( GridRangeInfo.Table() ); // resizes whole table

Here is a sample
http://www.syncfusion.com/Support/user/uploads/GGC_Autosize_44ccd4d7.zip

Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon