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.

auto resize of row height in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

38321 Dec 9,2005 11:24 AM Dec 10,2005 04:00 PM Windows Forms 6
loading
Tags: GridControl
Eric Weber
Asked On December 9, 2005 11:24 AM

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 12:20 PM

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\3.3.0.0\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 9, 2005 07:58 PM

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!

row_height_resize.zip

Eric Weber
Replied On December 9, 2005 08:43 PM

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 05:39 AM

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 03:14 PM

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

Eric Weber
Replied On December 10, 2005 04:00 PM

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

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.

;