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