I just upgraded the version of the controls I was using from version 7.2.something to 8.2 to fix an issue with the Tree control, and now I'm seeing a new problem in the appearance of a WinGrid.
I need the WinGrid to (a) wrap the contents of its cells and (b) autosize the height of its rows to fit the wrapped text. This was working beautifully before, but with the new version it appears that every row now has a minimum height that corresponds to two rows of text, even when none of the cells in the row wrap to a second line. Of course this looks fine when the text does wrap to a second (or even third) line. It's like it won't autosize down to fit the height of a single line of text.
And it's not a factor of all rows being fixed at the height of two lines of text. I can get one of the cells to wrap to a third line and its row height increases to accommodate this, while all other rows stay at the two-line height.
I have:
DisplayLayout.Override.CellMultiLine = trueDisplayLayout.Override.RowSizing = AutoFixed
I've spent the morning trying all kinds of permutations on other properties that I previously hadn't messed with, like DisplayLayout.Override.DefaultRowHeight (which is now back to its default of -1), DisplayLayout.Override.MinRowHeight (which is now back to its default of -1), and RowSizingAutoMaxLines (which is now back to its default of -1). DefaultRowHeight and MinRowHeight can increase the min height of the row, but won't get it down to the height of a single non-wrapped line of text.
So it seems that something has changed in the calculation of minimum row heights between 7.2 and 8.2.20082.1000, but I can't seem to find out how to fix it experimentally. Can you please help me with this?
Thanks!Jim Honeycutt
PS: Two more things:
(1) I also added some code that goes back through all the rows and calls PerformAutoSize() on each to see if that would help, but it didn't.
(2) I also thought it might've been due to some garbage left in the designer-generated code from the previous version that interfered, so I removed the control from the form and recreated it using the new version. Same results.
Thanks,Jim Honeycutt
Hi Jim,
Are you setting the TextRenderingMode property on the grid? Or maybe the static property of the same name on Infragisitcs.Win.
If you are using GDI (instead of GDI+), then this is a known bug in the grid that was introduced in v8.2 and will be fixed in the next hot fix.