This function is called when I change value of combo box.
when change event is called, I have replace jqgrid with loader image. later on it should replace with data. which is not happening.
function accountSummary()
{
var theme = ‘energyblue’;
$(‘#jqxgrid’).html(‘
‘);
var url = SITEDOMAIN+”/accounts/accountsummary”;
// prepare the data
var source =
{
datatype: “json”,
datafields: [
{ name: ‘numeroCompte’ },
{ name: ‘variation’, type: ‘float’ },
{ name: ‘variation_perc’ }
],
id: ‘id’,
url: url,
root: ‘data’
};
var dataAdapter = new $.jqx.dataAdapter(source);
$(“#jqxgrid”).jqxGrid(
{
width: 930,
source: dataAdapter,
theme: theme,
columnsresize: true,
columns: [
{ text: ‘NumeroCompte’, dataField: ‘numeroCompte’, width: 150},
{ text: ‘Variation’, dataField: ‘variation’, width: 120, cellsformat: ‘c2’ },
{ text: ‘Variation %’, dataField: ‘variation_perc’, width: 120, cellsformat: ‘c2’ }
]
});
}
Thanks,
Neelam