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.
Unfortunately, activation email could not send to your email. Please try again.

Can you resize a row in a grid automatically

Thread ID:

Created:

Updated:

Platform:

Replies:

74817 Jun 30,2008 04:35 AM Jun 8,2009 01:29 PM Windows Forms 3
loading
Tags: GridControl
Adrian Robson
Asked On June 30, 2008 04:35 AM

Hi,

Is it possible to resize a row in a grid automatically, so that if text cannot fit into a column then it will wrap around onto the next line and the height of that row will be adjusted so that you can see the text?

Thanks,


SubhaSheela R [Syncfusion]
Replied On June 30, 2008 07:18 AM

Hi Adrian,

Thanks for your interest in Syncfusion products.

Below is the code snippet to adjust the RowHeight of the grid.


this.gridDataBoundGrid1.Model.ColStyles[1].AutoSize = true;
this.gridDataBoundGrid1.Model.ColStyles[1].WrapText = true;
this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit(GridRangeInfo.Table());


You can refer the below forum thread also:

http://www.syncfusion.com/support/forums/message.aspx?MessageID=36669

Please let me know if it helps.

Regards,
Subhasheela R



Steven Mohnkern
Replied On June 3, 2009 05:58 PM

Can you do this same thing with GridGroupingControl?

Lingaraj S [Syncfusion]
Replied On June 8, 2009 01:29 PM

Hi Adrian,

Thank you for your update.

The GridGroupingControl the ResizeToFit in RowHeights can be done through a CustomEngine which calculates each rows. Please try using CustomEngine of resizable rows to achieve the ResizeToFit heights behavior in GridGroupingControl. If you want WrapText behaviour in GridGrouping control, then please try using WrapText and AllowEnter property in QuereyCellStyleInfo event and RezizeToFit method in TableControlCurrentCellChanged event to achieve this behavior in GridGroupingControl.

Please refer the sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/WrapText.zip

This sample demonstrate the Wrap Text behavior in GridGroupingControl.

Let me know if you have any queries.

Regards,
Lingaraj S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;