Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Wrap header to 2 columns
posted

Hi,

How do I wrap header to 2 lines in ultrawingrid even if the user reduces the column size?

Say I have a column "Security Desc", if the user reduces the column size, the wrapped text should be displayed in 2 rows (doesn't matter where it wraps) and not more than that. If it cannot be displayed then the header can be partially displayed in 2 lines/rows.

Currently when the column six is reduced to 2-3 characters the header hight increases to more than 2 rows.

 

Thanks,

Vijayan

Parents
  • 469350
    Offline posted

    Hi Vijayan,

    I don't think there is any way to impose a maximum number of rows on the column headers.

    I assume you have turned on WrapHeaderText to get the behavior you are describing. So one thing you could do is turn this off (or just don't turn it on, since it is off by default).

    Then you can set the ColHeaderLines to 2 and the headers will always display as two lines. To get the text to wrap, you set the captions of your columns to include a newline character.

    column.Header.Caption = "Security" + Environment.Newline + "Desc";

Reply Children
No Data