We are using v5.3.0 and using grouping with subgrid and celledit, grouping works great but having some trouble with summary
Tried to specify summaryType:’sum’ on a column that has formatter:’currency’ – seems to error out because I have cellattr on a another column. Can cellattr be used with grouping
2. How do change the style of the grouping row? background color?
About 1. Can you please post the grid setup and some simple data or send a demo link or demo files to the support?
About 2. It depend how you want to process.
a) In case if you want to add the same color of all first level grouping you can:
1
2
3
4
5
6
<style>
.jqGridghead_0 td {
background-color:background;
}
</style>
where jqGrid word in the classname is the id of the grid.
for the second level the generated class is jqGridghead_1 and etc.
b) If you want to do this dynamically depending a value one possible solution is to get the grouping names and add the appropriate classes in loadComplete by example.
you will see in code that columns – dblOrdered and curSalePrice – have cellattr function – if I remove the cellattr – then grouping summary renders correctly.
I believe the problem is rdata parameter is undefined for the grouping rows – this is what might be causing the issue.
yes, I understand cellattr is not a problem, I believe the problem – is with rdata parameter. When cellattr is being processed for every row – grouping header/row does not have rdata object.
I had to specifically add a check and now it works.