Reputation: 263
In my grid columns header/text are very long and I want to display it in 2-3 line, depends on requirement. Customer will put all this entry in a file with "\n" as new line character.
How to implment it in Extjs 4.1???
Note : 'br/>' works fine but all files created by end user with "\n" not with 'br>'.
Thanks.
Upvotes: 1
Views: 4256
Reputation: 817
Use cls
property for the column:
columns: [{
header: 'Multiline',
dataIndex: 'MyProp',
cls: 'multiline'
}]
And then modify css file
.multiline .x-column-header-inner .x-column-header-text { white-space: normal; }
Upvotes: 3
Reputation: 106
You can set this property in your css style:
.x-column-header-inner .x-column-header-text { white-space: pre-wrap; }
Pre-wrap info: http://www.w3schools.com/cssref/pr_text_white-space.asp
Upvotes: 2