我希望 Wijmo FlexGrid 标题的完整标题文本可见:
.
我怎样才能用 CSS 做到这一点?
我在做同样的事情时也面临同样的问题,这就是我解决这个问题的方法:
CSS更改:
.wjcGrid .wj-colheaders .wj-header {
text-overflow: initial;
}
html变化:
<wj-flex-grid #flex
[itemsSource]="data"
[isReadOnly]="true"
[headersVisibility]="'Column'"
[selectionMode]="'Row'"
(loadedRows)="onGridLoaded($event)"
[autoSizeMode] = "'Headers'">
</wj-flex-grid>
在组件中:
onGridLoaded(){
var self = this;
setTimeout(function() {
self.flex.autoSizeColumns();
},300);
}
您可以
setTimeout
从上述方法中删除,因为我在多次加载同一个网格时遇到了一些渲染问题。
希望它能解决你的问题。
您可以使用 text-overflow 属性并将其设置为省略号
您应该使用 Flexgrid 的 AutoSize 属性。检查这个线程: http ://wijmo.com/topic/auto-adjust-height-for-flexgrid-column-headers/
我正在使用 TypeScript 开发 HTML5/Angular JS 4 应用程序。我需要包装我的列标题。我只是像下面这样,它奏效了。
<wj-flex-grid #studentsWjFlexGrid [itemsSource]="studentsPerformanceData" style=" height:100%; width:100%">
<wj-flex-grid-column binding="longDescription" [width]="100" [wordWrap]="true">
<ng-template wjFlexGridCellTemplate cellType="ColumnHeader">
<span style="word-wrap: break-word;">Long Description Goes here</span>
</ng-template>
</wj-flex-grid-column>
</wj-flex-grid>