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