Hello,
I have a grid, that loads data in from an external data source, using json. the grid uses an aggregate on the revenue column.
The grid looks like this:
$("#jqxgrid").jqxGrid( { width: 670, source: dataAdapter, autoheight: true, showstatusbar: true, statusbarheight: 50, showaggregates: true, altrows: true, enabletooltips: true, columns: [ { text: 'System', datafield: 'system' }, { text: 'Revenue', datafield: 'revenue', cellsformat: 'C', aggregates: ['sum'] }, ] });
I then refresh the data in the grid using a date filter from a datetime picker like so:
$("#jqxButton").on('click', function () { var selection = $("#date").jqxDateTimeInput('getRange'); if (selection.from != null) { var data = { "start_date": selection.from.toLocaleDateString(), "end_date": selection.to.toLocaleDateString()}; source.data = data; source2.data = data; $("#jqxgrid").jqxGrid({ source: source, showaggregates: true }); $("#jqxgrid2").jqxGrid({ source: source2 }); var dataAdapterChart = new $.jqx.dataAdapter(source); $('#jqxChart').jqxChart({ source: dataAdapterChart }); var dataAdapterChart2 = new $.jqx.dataAdapter(source2); $('#jqxChart2').jqxChart({ source: dataAdapterChart2 }); } });
However,
When i do so, the aggregate data goes away and does not display. What can I do to fix this?