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

RowHeight

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

5 Replies

AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon