I'm creating jqgrid
dynamically, but have a problem. By creating footer jqgrid
, I want total column 'get' ; but it doesn't show any results.
How can I solve this problem?
this my code
loadComplete: function () {
var $self = $(this),
sum = $self.jqGrid("getCol", "get", false, "sum");
$self.jqGrid("footerData", "set", { get: sum });
},
this json data
data:
[
{ID:'1', get: 15 },
{ ID: '2', get: 585 },
{ ID: '3', get: 585 }
]
colModel:
[
{ ID: 'ID' IsForce: 'False', FieldType: Integer'},
{ ID: 'get' FieldType: 'Integer' }
]
I created the demo, to reproduce your problem and found the bug in footerData
, which exists only in RTL languages. I posted the corresponding fix to GitHub. The demo https://jsfiddle.net/OlegKi/dnfk8hmr/144/ loads the latest version of free jqGrid from GitHub (the fixed version) and you can verify that the problem is fixed.
I plan to publish version 4.15.3 recently (probably during the next weekend). After that it will be available on CDN. Till the time you will have to download the free jqGrid from GitHub.