ParamQuery grid support forum
General Category => Bug Report => Topic started by: Choggo on February 23, 2020, 06:02:58 am
-
In 5.6 I had the grid running similar to the https://paramquery.com/pro/demos/group_rows_hidden sample. Group by columns hidden and displaying merged with the first visible column
The difference to my set up from the example, is that I had summaryInTitleRow set to 'all'
This worked fine, summary row created and summary data visible up top.
I've upgraded to 7.1 and the column is no longer merged in to the first column when summary is set to all.
This is reproduceable in the linked sample, where the grouping is no longer displayed.
What's the best approach to fix this?
I've also noticed that if set to summaryInTitleRow to collapsed, it works, but upon collapse the row gets removed and can no longer be collapsed.
-
Please use groupModel.titleIndx option
if you want to display all titles in single column with non empty groupModel.summaryInTitleRow option.
Kindly check the updated example: https://paramquery.com/pro/demos/group_rows_hidden
-
Perfect - Thanks solved it.
I also noticed another issue, where a JS error happens if you set the summary to not editable and don't define a summary function.
column.summary = {
edit: false
};
It seems the code tries to evaluate the summary against pq.aggregate[undefined] and throws the error below:
pqgrid.min.js:9 Uncaught TypeError: T[c] is not a function
at n.cGroup._summaryT (pqgrid.min.js:9)
at n.cGroup._summaryT (pqgrid.min.js:9)
at n.cGroup._summaryT (pqgrid.min.js:9)
at n.cGroup._summaryT (pqgrid.min.js:9)
at n.cGroup.summaryT (pqgrid.min.js:9)
at e.<computed>.<computed>.<anonymous> (pqgrid.min.js:15)
at n (pqgrid.min.js:9)
at e.<computed>.<computed>.e._trigger (pqgrid.min.js:9)
at e.<computed>.<computed>.a._digestData (pqgrid.min.js:10)
at e.<computed>.<computed>.n.updateRow (pqgrid.min.js:14)
It happens in the group demo you linked, if I edit one of the summaries to empty
-
Thank you for noticing the issue, moving it to bug log..
-
Hi Paramvir,
A follow up on this, as perhaps the changes introduced in 7.0 with regards to grouping, have changed the behavior I'm used to - or perhaps there is a way of still doing what I want.
I've rolled back to 6.1 as this one seems to have the same behavior I had in 5.6.
When grouping on 1 field and using titleInFirstCol, I would get the grouping expand/collapse buttons in the first column, and where not in a group, I would be able to edit the values of the first column.
It seems as this is no longed possible, as when I enable the titleIndx column for the group, I can no longed edit the first column's values. Should I use the titleIndx of the column I want to be editable?
-
when I enable the titleIndx column for the group, I can no longer edit the first column's values.
titleIndx has nothing to do with editability of first column.
Can you please mention the steps to reproduce the issue.
-
All snippets to be applied to https://paramquery.com/pro/demos/group_rows_hidden
I'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 :)