如何更正 "Undefined aggregationValue"

How to correct an "Undefined aggregationValue"

我正在尝试获取网格中一列整数的总和。为什么在 gridOptions 中 aggregationValue 是 undefined 我将其设置为

{ field: 'premium', name: 'Premium', width: '*', aggregationType: uiGridConstants.aggregationTypes.sum, aggregationHideLabel: true, cellTemplate: '<div class="ui-grid-cell-contents">${{COL_FIELD}}</div>' },

这是对象的快照。如您所见,aggregationType 是 2(总和)。

这是 uiGridConstants 的快照[截图,表明它知道 typesum

这是构成网格的对象的示例

[
    {
        "id": "",
        "name": "Hadassah Potts",
        "type": "Wealth",
        "status": "Completed",
        "premium": 38823,
        "commission": 2039,
        "created_by": "Rose Strong",
        "last_updated": 75
    },
    {
        "id": "",
        "name": "Michael D. Hodge",
        "type": "Wealth",
        "status": "In Review",
        "premium": 37173,
        "commission": 4644,
        "created_by": "Thaddeus S. Wyatt",
        "last_updated": 49
    }
]

即使我没有使用 showColumnFooter: true, 我也需要在代码中包含它...