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

auto resize of row height in GGC

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!

6 Replies

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


EW Eric Weber 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!

row_height_resize.zip


EW Eric Weber 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?


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


EW Eric Weber December 10, 2005 08:14 PM UTC

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


EW Eric Weber December 10, 2005 09:00 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon