Код: Выделить всё
Код: Выделить всё
$configs['sell_list'] = array(
'query' => "SELECT
(...)",
'adminquery' => "SELECT
(...)",
'table' => 'tblwastesales',
'sortname' => 'PKSaleID',
'sortorder' => 'desc',
'caption' => 'final receivers',
'columns' => array(
'Company' => array(
"width" => 60,
"align" => "left"),
'sls_datefixed' => array(
"formatter" => "date",
"width" => 20,
"align" => "center",
"formatoptions" => array("srcformat" => "Y/m/d H:i", "newformat" => "d/m/Y H:i")
),
'weighttotal' => array(
"formatter" => "number",
"formatoptions" => array("decimalSeparator" => ",", "thousandsSeparator" => ".", "decimalPlaces" => 2),
"width" => 20,
"align" => "right"
),
'ProductDescription' => array("label" => "Τελικό προϊον", "width" => 70, "align" => "left"),
'wc_company' => array( "width" => 80, "align" => "left")
),
'hidden' => array('PKSaleID', 'FKMaterialID', 'sls_weight'),
'footer' => true,
'summary' => array("weighttotal" => array("round(sls_weight/1000,2)" => "SUM")),
'footerData' => array("sls_date" => "sum (t):")
);
Код: Выделить всё
function fnMenuXMLExport(gridFile, pageType) {
if (!pageType) {
pageType = jQuery("#grid").jqGrid('getGridParam', 'postData').pagetype || '';
}
if (!pageType) {
alert('Missing page type for Excel export!');
return;
}
var exportUrl = gridFile + '?pagetype=' + encodeURIComponent(pageType) + '&oper=excel';
jQuery("#grid").jqGrid('excelExport', { url: exportUrl });
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... stact-grid