'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'); if (0) { // REVISIT: Need to figure out how to put this in play $cols['Type'] = array('index' => 'ContactsCustomer.type', 'width' => '75'); $cols['Active'] = array('index' => 'ContactsCustomer.active', 'width' => '75'); } $cols['Comment'] = array('index' => 'Contact.comment', 'formatter' => 'comment'); // Set up search fields if requested by caller if (isset($searchfields)) $grid->searchFields(array('Last Name', 'First Name')); // Render the grid $grid ->columns($cols) ->sortField('Last Name') ->defaultFields(array('ID', 'Last Name', 'First Name')) ->render($this, isset($config) ? $config : null);