Count on footerdata

QuestionsCount on footerdata
Joel Gomes asked 8 years ago

Hi
I need some help, i cant get count to work on my footer, this is my code:
<script>
var opts = {

'loadComplete': function () {
var grid = $("#list"),

ft = grid.jqGrid('getCol', 'fortyFT', false, 'sum');
tw = grid.jqGrid('getCol', 'twentyFT', false, 'sum');
so = grid.jqGrid('getCol', 'SOC', false, 'sum');
cb = grid.jqGrid('getCol', 'CBM', false, 'sum');
sum3 = grid.jqGrid('getCol', 'VALUE', false, 'sum');
g = sum3 * 0.9247;
c = grid.jqGrid('getCol', 'CERT_N', false, 'count');
f = grid.jqGrid('getCol', 'BL', false, 'count');
d = f * 60;
e = g + d;

grid.jqGrid('footerData','set', {fortyFT: '40ft: '+ft,
twentyFT: '20ft: '+tw,
SOC: 'Soc: '+so,
CBM: 'Cbm: '+cb,
VALUE: '$: '+sum3,
CERT_N: 'Cert: ' +c,
BL: '€: ' +e}, false);

}
};

</script>

He counts more than it should…

thank you so mutch

Your Answer

12 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?