Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1845
Summaries not displaying with summaryOperands
posted

Using the below code.  My grid doesn't display summaries.  If I take out the summaryOperands, the summaries are displayed.  What is the issue?

$(function () {
$('#TransactionSummary_Grid').igGrid({
dataSource: {
"Records": [{
"fk_emp_id": 15,
"fk_com_trans_type": "Increase Reserves",
"Debit": 2613.20,
"Credit": 0.00,
"Net": 2613.20,
"PropertiesDisplayValues": {}
}, {
"fk_emp_id": 15,
"fk_com_trans_type": "Full Commission",
"Debit": 5518.80,
"Credit": 0.00,
"Net": 5518.80,
"PropertiesDisplayValues": {}
}, {
"fk_emp_id": 15,
"fk_com_trans_type": "Decrease Reserves",
"Debit": 0.00,
"Credit": -2614.20,
"Net": -2614.20,
"PropertiesDisplayValues": {}
}, {
"fk_emp_id": 15,
"fk_com_trans_type": "Bonus",
"Debit": 75.00,
"Credit": 0.00,
"Net": 75.00,
"PropertiesDisplayValues": {}
}],
"TotalRecordsCount": 0,
"Metadata": {
"timezoneOffset": -18000000,
"Summaries": {
"fk_com_trans_type": {
"count": 4
},
"Debit": {
"count": 4
},
"Credit": {
"count": 4
},
"Net": {
"count": 4
}
}
}
},
dataSourceType: 'json',
autoGenerateColumns: false,
autoGenerateLayouts: false,
responseDataKey: 'Records',
generateCompactJSONResponse: false,
columns: [{
headerText: '<span style=\'text-align: left; display:block;\'>Transaction Type<span>',
key: 'fk_com_trans_type',
width: '35%',
hidden: false,
formatter: null,
template: '<span style=\'text-align: left; display:block;\'>${fk_com_trans_type}</span>'
}, {
headerText: '<span style=\'text-align: center; display:block;\'>Debit<span>',
key: 'Debit',
width: '22%',
hidden: false,
formatter: Orange.toCurrencyString2,
template: '<span style=\'text-align: right; padding-right:20px; display:block;\'>${Debit}</span>'
}, {
headerText: '<span style=\'text-align: center; display:block;\'>Credit<span>',
key: 'Credit',
width: '21%',
hidden: false,
formatter: Orange.toCurrencyString2,
template: '<span style=\'text-align: right; padding-right:20px; display:block;\'>${Credit}</span>'
}, {
headerText: '<span style=\'text-align: center; display:block;\'>Net<span>',
key: 'Net',
width: '21%',
hidden: false,
formatter: Orange.toCurrencyString2,
template: '<span style=\'text-align: right; padding-right:20px; display:block;\'>${Net}</span>'
}],
features: [{
sortUrlKey: 'sort',
sortUrlKeyAscValue: 'asc',
sortUrlKeyDescValue: 'desc',
name: 'Sorting',
mode: 'single',
type: 'local'
}, {
name: 'Selection',
mode: 'row',
multipleSelection: false
}, {
name: 'Resizing'
}, {
summaryExprUrlKey: 'Summaries',
summariesResponseKey: 'Metadata.Summaries',
columnSettings: [{
columnIndex: -1,
allowSummaries: false,
columnKey: 'fk_com_trans_type'
}, {
columnIndex: -1,
allowSummaries: true,
columnKey: 'Debit',
summaryOperands: [{
type: 'sum',
active: true,
rowDisplayLabel: 'Total'
}]
}, {
columnIndex: -1,
allowSummaries: true,
columnKey: 'Credit',
summaryOperands: [{
type: 'sum',
active: true,
rowDisplayLabel: 'Total'
}]
}, {
columnIndex: -1,
allowSummaries: true,
columnKey: 'Net',
summaryOperands: [{
type: 'sum',
active: true,
rowDisplayLabel: 'Total'
}]
}],
name: 'Summaries',
showDropDownButton: false,
showSummariesButton: false,
type: 'local'
}],
jQueryTemplating: false,
autoAdjustHeight: false,
width: '100%',
renderCheckboxes: true,
localSchemaTransform: false
});
});

Parents Reply Children