Ticket Q106060
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Appearances - Word Wrap and Trimming combination is needed

Header row word wrap

created 17 years ago

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

Comments (3)
DevExpress Support Team 17 years ago

    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

      DevExpress Support Team 17 years ago

        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

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.