'Customer.id', 'formatter' => 'id'); if (0) // REVISIT: Need to figure out how to put this in play $cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'width' => '75'); $cols['Name'] = array('index' => 'Customer.name', 'formatter' => 'longname'); $cols['Last Name'] = array('index' => 'PrimaryContact.last_name', 'formatter' => 'name'); $cols['First Name'] = array('index' => 'PrimaryContact.first_name', 'formatter' => 'name'); $cols['Leases'] = array('index' => 'lease_count', 'width' => '60'); $cols['Balance'] = array('index' => 'balance', 'formatter' => 'currency', 'sortable' => false); $cols['Comment'] = array('index' => 'Customer.comment', 'formatter' => 'comment'); $jqGrid_options = array('jqGridColumns' => $cols, 'controller' => 'customers'); // User requested options have priority $jqGrid_options += compact('grid_div_id', 'grid_id', 'caption', 'grid_setup', 'limit'); if (isset($customers)) { $jqGrid_options += array('custom_ids' => array_map(create_function('$data', 'return $data["id"];'), $customers), 'limit' => 5); } // Not the long term solution here... just for testing if (isset($searchfields)) { $jqGrid_options += array('search_fields' => array('Last Name', 'First Name')); } echo $this->element('jqGrid', $jqGrid_options);