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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

RowHeight

Thread ID:

Created:

Updated:

Platform:

Replies:

47759 Aug 11,2006 08:09 AM UTC Aug 16,2006 05:09 AM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 11, 2006 08:09 AM UTC

Hi,

Is there a property that we can set in a GridDataBoundGrid so that the Row Height can be adjusted according to the width of the column and the length of the text?

kai

Administrator [Syncfusion]
Replied On August 11, 2006 08:11 AM UTC

btw, I am using Syncfusion Grid 3.3

>Hi,

Is there a property that we can set in a GridDataBoundGrid so that the Row Height can be adjusted according to the width of the column and the length of the text?

kai

Administrator [Syncfusion]
Replied On August 11, 2006 10:27 AM UTC

Hi Kai,

You can use the RowHeights.ResizeToFit() method, to make the row height to get adjusted in order to accommodate the cell contents.

this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit( GridRangeInfo.Table() );

Similiarly, Colwidths.ResizeToFit() can be used, to make the cell contents fit according to the column width.

this.gridDataBoundGrid1.Model.Colwidths.ResizeToFit( GridRangeInfo.Table() );

Let us know if you have any further questions.
Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 15, 2006 08:00 AM UTC

Hi,
I have used the ResizeToFit method and I got one problem. It seems that the Height of the row didn''t get adjusted correctly based on how many lines I have in the cell. Is there a solution to this?

Thanks.
Kai

>Hi Kai,

You can use the RowHeights.ResizeToFit() method, to make the row height to get adjusted in order to accommodate the cell contents.

this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit( GridRangeInfo.Table() );

Similiarly, Colwidths.ResizeToFit() can be used, to make the cell contents fit according to the column width.

this.gridDataBoundGrid1.Model.Colwidths.ResizeToFit( GridRangeInfo.Table() );

Let us know if you have any further questions.
Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 15, 2006 08:01 AM UTC

i.e. I have new line character inside my cells.

>Hi,
I have used the ResizeToFit method and I got one problem. It seems that the Height of the row didn''t get adjusted correctly based on how many lines I have in the cell. Is there a solution to this?

Thanks.
Kai

>Hi Kai,

You can use the RowHeights.ResizeToFit() method, to make the row height to get adjusted in order to accommodate the cell contents.

this.gridDataBoundGrid1.Model.RowHeights.ResizeToFit( GridRangeInfo.Table() );

Similiarly, Colwidths.ResizeToFit() can be used, to make the cell contents fit according to the column width.

this.gridDataBoundGrid1.Model.Colwidths.ResizeToFit( GridRangeInfo.Table() );

Let us know if you have any further questions.
Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 16, 2006 05:09 AM UTC

Hi Kai,

Are you using PrepareViewStyleInfo event to set the content of the cell? If yes, please refer the below forum thread.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=43705

For more details on ResizeTofit method, See the below thread.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=44059

Let me know if this helps.
Best Regards,
Haneef

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.

Warning Icon 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.Close Icon

;