ExtJS 4 - Wrapping the column headers in grid panel

血红的双手。 提交于 2019-12-06 04:12:05

问题


I have a grid which has long phrases as header texts. These texts are never displayed properly in the available width for the column.

Is there any way these texts can be wrapped and limited to the column width?

Here is an image of the issue:


回答1:


Give this a shot in your CSS:

.x-grid3-hd-inner {
     overflow: hidden;
     padding: 3px 3px 3px 5px;
     white-space: normal;
}

And additionally, another option if the first doesn't work:

.x-column-header-inner .x-column-header-text {
    white-space: normal;
}

.x-column-header-inner {
    line-height: normal;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    text-align: center;
    top: 20%;
}


来源:https://stackoverflow.com/questions/7361512/extjs-4-wrapping-the-column-headers-in-grid-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!