Added ability for callers to control the jqGrid sort order
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@199 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -151,6 +151,14 @@ if (isset($sort_column)) {
|
||||
}
|
||||
$sortname = $sortname['index'];
|
||||
|
||||
// Set the default sort order
|
||||
if (isset($sort_order)) {
|
||||
$sortorder = $sort_order;
|
||||
} else {
|
||||
$sortorder = 'ASC';
|
||||
}
|
||||
|
||||
|
||||
// Configure the grid setup, giving priority to user defined parameters
|
||||
$jqGrid_setup = array_merge
|
||||
(array('mtype' => 'GET',
|
||||
@@ -163,6 +171,7 @@ $jqGrid_setup = array_merge
|
||||
'rowNum' => $limit,
|
||||
'rowList' => $limitOptions,
|
||||
'sortname' => $sortname,
|
||||
'sortorder' => $sortorder,
|
||||
'caption' => $caption,
|
||||
'imgpath' => $imgpath,
|
||||
'viewrecords' => true,
|
||||
|
||||
Reference in New Issue
Block a user