Since Lease.number is a VARCHAR, it doesn't sort well. So I added a hidden column for Lease.id, which sorts better.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@192 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
// Define the table columns
|
||||
$cols = array();
|
||||
$cols['LeaseID'] = array('index' => 'Lease.id', 'hidden' => true);
|
||||
$cols['Lease'] = array('index' => 'Lease.number', 'formatter' => 'id');
|
||||
$cols['Unit'] = array('index' => 'Unit.name', 'width' => '50', 'align' => 'center');
|
||||
$cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname');
|
||||
@@ -26,4 +27,5 @@ else {
|
||||
$jqGrid_options += array('search_fields' => array('Customer', 'Unit'));
|
||||
}
|
||||
|
||||
$jqGrid_options['sort_column'] = 'LeaseID';
|
||||
echo $this->element('jqGrid', $jqGrid_options);
|
||||
|
||||
Reference in New Issue
Block a user