【发布时间】:2017-08-31 23:28:18
【问题描述】:
我尝试使用此解决方案,但它对我不起作用,它正确调整列高,但文本未换行。 Ag-Grid - Row with multiline text
var gridOptions = {
columnDefs: columnDefs,
rowSelection: 'multiple',
enableColResize: true,
enableSorting: true,
enableFilter: true,
enableRangeSelection: true,
suppressRowClickSelection: true,
animateRows: true,
onModelUpdated: modelUpdated,
debug: true,
autoSizeColumns:true,
getRowHeight: function(params) {
// assuming 50 characters per line, working how how many lines we need
return 18 * (Math.floor(params.data.zaglavie.length / 45) + 1);
}
};
function createRowData() {
return gon.books;
}
【问题讨论】:
标签: javascript ag-grid multiline