Mad*_*u K 3 angularjs angular-ui angularjs-directive angular-ui-bootstrap angular-ui-grid
我正在使用Angularjs ui网格分组功能.请参阅图像,当显示组总和时,默认情况下显示为"总计:"但我想将其更改为"总计"(大写"T"),并且我还想将聚合总计限制为2个十进制数.我需要更改设置的位置?
以下是我对Ui Grid的colDef:
angular.forEach(columns, function(value, key) {
columnDefs.push({
name: key,
displayName: value,
enableCellEdit: false,
aggregationType: uiGridConstants.aggregationTypes.sum,
width: '8%'
})
});
Run Code Online (Sandbox Code Playgroud)

如果要自定义列页脚,则需要为列提供footerCellTemplate.
footerTemplate可以配置为仅显示两位小数
footerCellTemplate: '<div class="ui-grid-cell-contents">\'Total\' (capital \'T\') {{col.getAggregationValue() | number:2 }}</div>'
Run Code Online (Sandbox Code Playgroud)
http://plnkr.co/edit/u75EC8gxdIBxHzthaH15?p=preview显示了一个可以更改标签和小数的示例.
| 归档时间: |
|
| 查看次数: |
1785 次 |
| 最近记录: |