0
我在我的项目中使用ui网格,其中我添加了一个反映网格中该列值的平均值的聚集平均行。现在我已经实现了“导出为PDF”选项,但导出网格时不包括反映平均值的页脚行。我看着http://ui-grid.info/docs/#/api/ui.grid.exporter.api:GridOptions并试图提到有:在角度ui网格如何在导出到pdf时包含页脚行
gridOptions.exporterPdfCustomFormatter = function (docDefinition) {
docDefinition.styles.footerStyle = { bold: true, fontSize: 10 };
return docDefinition;
}
gridOptions.exporterPdfFooter = { text: 'My footer', style: 'footerStyle' }
或
gridOptions.exporterPdfFooter = 'My Footer';
或
gridOptions.exporterPdfFooter = {
columns: [
'Left part',
{ text: 'Right part', alignment: 'right' }
]
};
好像这些选项不工作或我做错了。有什么建议么?
当你不使用$范围。$ scope.getFooterValue在gridOptions或当做出口(),对不对?这将如何使用呢?另外如果我是列的数量,如果这是一个动态网格,您可能必须在多列中获取聚合值,那么如何传递函数? – MSIslam