Hello,
I'm using truncate text script to trim data to be displayed in cells,
var truncateRenderSummary = function (ui) {
var dataRow = ui.rowData.Summary;
// console.log(ui.rowData);
// dataRow = sanitize(dataRow);
if (dataRow.length > 15)
return dataRow.substring(0, 17) + '...';
else
return dataRow;
}
But in turns I got Uncaught TypeError: Cannot read property 'style' of null error, and the child grid display becomes blank
My parent grid settings:
{ title: "Summary", dataType: "string", minWidth: '150', align: "center", dataIndx: "Summary", render: truncateRenderSummary },
//
resizable: true,
flexHeight: true,
flexWidth: false,
collapsible: true,
hoverMode: 'row',
pageModel: { type: "remote", rPP: 10, strRpp: "{0}" },
dataModel: dataModel,
colModel: colModel,
filterModel: { on: true, mode: "OR", header: true, type: 'remote' },
selectionModel: { mode: 'single', type: 'row' },
virtualX: true, virtualY: false,
editable: false,
showTitle: false,
hwrap: false,
editModel: { clicksToEdit: 2 },
selectionModel: { mode: 'single', type: 'row' },
detailModel: { init: initDetail },
// toolbar settings
and my child grid settings:
width: 'flex',
maxHeight: 180,
hwrap: false,
numberCell: { show: false },
showTop: false
I need the row height flexibility of the parent grid,
can each row be in fixed height to accommodate the truncate function?