Word-wrap grid cells in Ext JS

后端 未结 6 1805
野性不改
野性不改 2020-12-24 12:17

(This is not a question per se, I\'m documenting a solution I found using Ext JS 3.1.0. But, feel free to answer if you know of a better solution!)

The Colu

6条回答
  •  醉梦人生
    2020-12-24 12:52

    If you only want to wrap text in certain columns and are using ExtJS 4, you can specify a CSS class for the cells in a column:

    {
        text: 'My Column',
        dataIndex: 'data',
        tdCls: 'wrap'
    }
    

    And in your CSS file:

    .wrap .x-grid-cell-inner {
        white-space: normal;
    }
    

提交回复
热议问题