All snippets to be applied to
https://paramquery.com/pro/demos/group_rows_hiddenI've mode the dataModel lines to before the grouping lines I've pasted below.
If I do it like this - I don't get to see the roll up option
I removed the titleIndx and tried to use what works in pre 7.x versions
summaryInTitleRow: 'all',
first two columns are text and should not have summary
titleInFirstCol:true,
Since there's no summary for rows 1 and 2, I should be able to edit column one, where not groupped
var colM = [
// { dataIndx: 'grp', title: 'Group'},
{ title: "ShipCountry", width: 120, dataIndx: "ShipCountry",
filter: {
condition: 'range'
}
},
{ title: "Customer Name", width: 130, dataIndx: "ContactName" },
{ title: "Freight", width: 120, format: '$##,###.00',
summary: {
type: "sum"
},
dataType: "float", dataIndx: "Freight"
},
{ title: "Shipping Via", width: 130, dataIndx: "ShipVia" },
{ title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date" },
{ title: "Shipping Address", width: 220, dataIndx: "ShipAddress" },
{ title: "Shipping City", width: 130, dataIndx: "ShipCity" }
];
var groupModel = {
on: true,
headerMenu: false,
indent: 20,
dataIndx: ['ShipCountry'],
summaryInTitleRow: 'all',
//titleIndx: 'grp',
titleInFirstCol:true,
showSummary: [true], //to display summary at end of every group.
collapsed: [false]
};
titleIndx and first group column used
Result is a very empty first column, with the expand collapse, non group data starts showing as of column 2
var colM = [
{ dataIndx: 'grp', title: 'Group'},
{ title: "ShipCountry", width: 120, dataIndx: "ShipCountry",
filter: {
condition: 'range'
}
},
{ title: "Customer Name", width: 130, dataIndx: "ContactName" },
{ title: "Freight", width: 120, format: '$##,###.00',
summary: {
type: "sum"
},
dataType: "float", dataIndx: "Freight"
},
{ title: "Shipping Via", width: 130, dataIndx: "ShipVia" },
{ title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date" },
{ title: "Shipping Address", width: 220, dataIndx: "ShipAddress" },
{ title: "Shipping City", width: 130, dataIndx: "ShipCity" }
];
var groupModel = {
on: true,
headerMenu: false,
indent: 20,
dataIndx: ['ShipCountry'],
summaryInTitleRow: 'all',
titleIndx: 'grp',
//titleInFirstCol:true,
showSummary: [true], //to display summary at end of every group.
collapsed: [false]
};
titleInFirstCol:true introduced. Group column displays blank and expand collapse option available
var colM = [
{ dataIndx: 'grp', title: 'Group'},
{ title: "ShipCountry", width: 120, dataIndx: "ShipCountry",
filter: {
condition: 'range'
}
},
{ title: "Customer Name", width: 130, dataIndx: "ContactName" },
{ title: "Freight", width: 120, format: '$##,###.00',
summary: {
type: "sum"
},
dataType: "float", dataIndx: "Freight"
},
{ title: "Shipping Via", width: 130, dataIndx: "ShipVia" },
{ title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date" },
{ title: "Shipping Address", width: 220, dataIndx: "ShipAddress" },
{ title: "Shipping City", width: 130, dataIndx: "ShipCity" }
];
var groupModel = {
on: true,
headerMenu: false,
indent: 20,
dataIndx: ['ShipCountry'],
summaryInTitleRow: 'all',
titleIndx: 'grp',
titleInFirstCol:true,
showSummary: [true], //to display summary at end of every group.
collapsed: [false]
};
End goal, a picture attached, to better show the objective