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

auto resize of row height in GGC

Thread ID:





38321 Dec 9,2005 04:24 PM UTC Dec 10,2005 09:00 PM UTC WinForms 6
Tags: GridControl
Eric Weber
Asked On December 9, 2005 04:24 PM UTC

I''ve seen lots of postings on this, but either for other types of grids, or for user input cells. We have GGC with read-only data columns, and read only summary columns. 1. when the grid gets populated, how do I resize the row height to columns that have accomodate wrapping text? 2. after the grid is populated, and if a grid column were to get resized narrower, causing the text to wrap, how would I resize the row height? Thanks!

Administrator [Syncfusion]
Replied On December 9, 2005 05:20 PM UTC

One comment is that 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\\Windows\Grid.Windows\Samples\Grouping\ResizableRows Once you have this, then you can call TableControl.Model.RowHeights.ResizeToFit to handle either of these cases. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_Forum_ResizeToFit_a41fcf80.zip

Eric Weber
Replied On December 10, 2005 12:58 AM UTC

Thanks again Clay for all of your help. I am now using your custom grouping engine, and it works quite well. Only three noticable issues: (1) at some point as I am making a column narrower, the row height stops getting larger and text begins to get cut off (in the attachments, compare the 5th row in the top grid) (2) once a row height has expanded to accomodate say 5 rows of text, the row height will never decrease again, even when I make the column width very wide. In other words, if the cell height has expanded to display 5 rows of text, then I make the column width very wide, and the text shrinks to only take up 3 rows, the row height is still tall enough for 5 rows. (3) initially, in the lower grid, the row heights all come up perfect. But then, after adding a group, the summary column does not resize its height. (see the after.jpg file) thanks!


Eric Weber
Replied On December 10, 2005 01:43 AM UTC

i see that your example doesn''t have any of these issues.....maybe I am inheriting some code that is causing these problems......any ideas?

Administrator [Syncfusion]
Replied On December 10, 2005 10:39 AM UTC

Just as a test, when you can ResizeToFit, pass in GridRangeInfo.Table() as the range just to see if the problem is whether you are resizing the some unexpected range as this might explain why you are not getting the results you expect.

Eric Weber
Replied On December 10, 2005 08:14 PM UTC

Unfortunately I have been using GGC.TableControl.Model.RowHeights.ResizeToFit(GridRangeInfo.Table()) the whole time.

Eric Weber
Replied On December 10, 2005 09:00 PM UTC

nevermind....my bad.....everything is working now perfectly except 1 thing.....issue #3 in my previous posting


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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