我有一条腰带。我想在一些网格单元格中显示多行。以下是我生成的包含两行文本的 div。但这并没有呈现第二行,即“测试新行”。
<div class="x-grid3-cell-inner x-grid3-col-event x-unselectable" style="height:134px;line-height:134px;" unselectable="on">
<div>
<a href="some link">XYZ funding round: Series C</a> (Funding Round)
<br>
test new line
</div>
</div>
这是一个 extjs 3.4 网格。
知道为什么这不会呈现两行吗?
最佳答案
我用网格的 viewConfig 选项解决了这个问题:
viewConfig: {
loadingText: lang.loading,
loadMask: true,
stripeRows: true,
getRowClass: function(record, rowIndex, rowParams, store) {
return 'multiline-row';
}
},
在 CSS 文件中:
.multiline-row .x-grid-cell-inner {
overflow: auto !important;
white-space: normal !important;
text-overflow: ellipsis;
display: block;
}
并且在 ExtJS 4 中工作正常。
希望对您有所帮助。
关于html - extjs网格面板单元格中的多行文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22457784/