I am a bit confused about the header caption word-wrap ability of the XtraGrid. I have set my ColumnPanelRowHeight to 50 (more than enough for 2 rows). I also set Appearance.HeaderPanel.TextOptions.WordWrap to DevExpress.Utils.WordWrap.Wrap. Now my column captions do wrap but they do so at whatever point they see fit (ie right in the middle of the caption or they show 10 characters on the first line and the last one on the 2nd). I even tried tried changing the Appearance.HeaderPanel.TextOptions.Trimming to something other than default to no avail.
Is there any way I can force the view to draw its columns caption using word wrap when there are more than one word in the caption but not wrap the single word captions (maybe use the ellipsis instead)?
Thank you in adace,
Calin, Toronto
We have closed this ticket because another page addresses its subject:
Appearances - Word Wrap and Trimming combination is needed
Hello Calin,
Please take a look at the following Knowledge Base article and the sample project attached to it.
How to enable the word-wrap feature for the captions of columns
If it doesn't help in your situation, please send your test project to me and explain what's wrong with it. I'll try to find a solution.
Thanks,
Nick
Hi, Nick, and thank you for your quick reply.
Yes, I did look at that, I also checked the knowledge base article about multi line headers. My question is not neccesarily with the wrapping of words, more with the wrapping of single word headers. Take a look at the image attached, check how "Reference", "Description", "Provisional" show up. Also check the compound headers ("Allocated amount", "Discount expires", "Discount taken", "Header number"), they look fine and they are not the problem at this point.
As I said, I tried various Trimming options in conjunction with the WordWrap settings but none seem to make a difference.
So, any solution to that?
Thanks again,
Calin
Hello Calin,
Thank you for the additional information. I see the problem. We'll try to improve the Word Wrap feature in a future version. I've added a suggestion to our database: Appearances - Word Wrap and Trimming combination is needed.
Generally, I'm not sure whether it's technically possible to implement this feature. If you know how to implement it in your situation, you can handle the CustomDrawColumnHeader event to draw captions via your own code.
Thanks,
Nick