Hi,
I've determined that the UltraTree (with FreeForm ViewStyle) does not have a method for automatically sizing the node height to fit wrapped text if CellWrapText=true. I need the cell text to wrap though, so I'm trying to calculate the height of the wrapped text so I can set PreferredCellSize appropriately to show the entire text. Is there a reliable way to do this? I've tried using TextRenderer.MeasureText() with different combinations of TextFormatFlags and Graphics.MeasureString(), but neither one has given me reliably accurate results. Is there a way to get the number of wrapped lines directly from the cell/column object? If not, what would you recommend I use for measuring the text height?
Thanks,
Cassio
Hello,
Thank you for your feedback.
Please let me know if you need my further assistance on this matter.
My tree has multiiple node levels, each with its own column set. I'm not sure how I would accomplish that with the UltraGrid. At this point, I have it working well enough to move on and it would require too much effort to try to switch to an UltraGrid.
Thanks for your suggestions and help though.
Maybe you could use UltraGrid instead of UltraTree, and to add additional column “Node” and to group your grid by this column.
I hope that this will helps you.
I still have the problem that I cannot accurately calculate the height of the cell. The "Auto resize row height" feature will get rid of the problem if it ever makes it into the product, but I still should be able to do this. If I knew exactly how the text is being rendered in the cell, I could use the same flags to measure the text.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.