'Contact.id', 'formatter' => 'id'); $cols['Last Name'] = array('index' => 'Contact.last_name', 'formatter' => 'name'); $cols['First Name'] = array('index' => 'Contact.first_name', 'formatter' => 'name'); $cols['Company'] = array('index' => 'Contact.company_name', 'formatter' => 'longname'); $cols['Type'] = array('index' => 'ContactsCustomer.type', 'formatter' => 'enum'); $cols['Active'] = array('index' => 'ContactsCustomer.active', 'formatter' => 'enum'); $cols['Comment'] = array('index' => 'Contact.comment', 'formatter' => 'comment'); // Render the grid $grid ->columns($cols) ->sortField('Last Name') ->defaultFields(array('ID', 'Last Name', 'First Name')) ->searchFields(array('Last Name', 'First Name', 'Company')) ->render($this, isset($config) ? $config : null, array_diff(array_keys($cols), array('Type', 'Active', 'Comment')));