Now i using ParamQuery 5
This is my setting.Can you check and tell me something wrong. Thanks!
height: 'flex',
height: ClHeight,
resizable: false,
virtualX: true, virtualY: true,
title: tran('adjustment'),
rowBorders: false,
rowHt: 20,
toggle: function( event, ui ) {
if (ui.state == 'max') {
$('#'+ event.target.id).css('top', '34px');
}
},
filterModel: {
on: true,
mode: "AND",
header: true
},
swipeModel: {
on: 'touch'
},
treeModel: {
dataIndx: 'chart_of_account_name',
chk_dataIndx: 'state',
cascade: true,
checkbox: function(rd) {
return !(rd.variance == undefined) && !(rd.variance == 0);
},
render: function (ui) {
if (ui.rowData.variance == undefined) {
var checked = ui.rowData.state?"checked":"";
return {
text: "<input type='checkbox' checked " + checked +" disabled style='width:18px;'/>" + ui.rowData.chart_of_account_name
};
} else if(ui.rowData.variance == 0) {
return {
text: "<input type='checkbox' checked "+ checked +" disabled style='width:18px;'/>" + ui.rowData.chart_of_account_name
};
}
}
},
sortModel: {
ignoreCase: true
},
scrollModel: {
autoFit: true
},
colModel: [{
dataIndx: 'chart_of_account_name',
title: dbtran('chart_of_account_name'),
exportRender: true,
filter: {
type: 'textbox',
attr: 'autocomplete="off"',
condition: "contain",
listener: 'keyup'
},
editable: false
},
{
dataIndx: 'chart_of_account_code',
title: dbtran('chart_of_account_code'),
align: 'center',
filter: {
type: 'textbox',
attr: 'autocomplete="off"',
condition: "contain",
listener: 'keyup'
},
maxWidth: 150,
width: 150,
editable: false
},{
dataIndx: 'currency_iso',
title: dbtran('currency_iso'),
align: 'center',
maxWidth: 60,
width: 60,
editable: false
}, {
dataIndx: 'calculate_ledger_balance',
title: dbtran('calculate_ledger_balance'),
dataType: 'float',
format: '#,###.00',
maxWidth: 150,
width: 100,
align: 'right',
editable: false,
summary: {
type: "sum"
}
}, {
dataIndx: 'closing_balance',
title: dbtran('closing_balance'),
dataType: 'float',
format: '#,###.00',
maxWidth: 150,
width: 100,
align: 'right',
editable: false,
summary: {
type: "sum"
},
render: function (ui) {
// if (ui.rowData.ledger_balance != undefined && ui.rowData.ledger_balance.length > 0) {
return {closing_balance: 1000};
// }
}
}, {
dataIndx: 'variance',
title: dbtran('variance'),
dataType: 'float',
format: '#,###.00',
maxWidth: 150,
width: 100,
align: 'right',
editable: false,
summary: {
type: "sum"
}
}],
dataModel: {
location: "remote",
dataType: "JSON",
method: "GET",
url: "/adjustments/chartofaccounts?report_date=" + reportDate,
getData: function (res) {
return {data: res};
}
},
groupModel: groupModel