'Customer.id', 'width' => '30', 'align' => 'center'); if (isset($customers[0]['ContactsCustomer'])) $cols['Relationship'] = array('index' => 'ContactsCustomer.type', 'width' => '75', 'align' => 'left'); $cols['Name'] = array('index' => 'Customer.name', 'width' => '150', 'align' => 'left'); $cols['Last Name'] = array('index' => 'PrimaryContact.last_name', 'width' => '100', 'align' => 'left'); $cols['First Name'] = array('index' => 'PrimaryContact.first_name', 'width' => '100', 'align' => 'left'); $cols['Leases'] = array('index' => 'lease_count', 'width' => '60', 'align' => 'center'); $cols['Comment'] = array('index' => 'Customer.comment', 'width' => '300', 'align' => 'left'); // Some of the columns should not be sortable foreach (array_intersect_key($cols, array('Comment'=>1)) AS $k => $v) $cols[$k]['sortable'] = false; // Some of the columns should be searchable foreach (array_intersect_key($cols, array('Last Name'=>1, 'First Name'=>1)) AS $k => $v) $cols[$k]['search'] = true; echo $this->element('jqGrid', array('jqGridColumns' => $cols)); ?>
Search By:
Enable Autosearch
Last Name

First Name