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.

RowHeight

Thread ID:

Created:

Updated:

Platform:

Replies:

47759 Aug 11,2006 04:09 AM Aug 16,2006 01:09 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 11, 2006 04:09 AM

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 04:11 AM

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 06:27 AM

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 04:00 AM

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 04:01 AM

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 01:09 AM

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.

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.

;