'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'); $cols['Comment'] = array('index' => 'Customer.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('Name') ->defaultFields(array('ID', 'Name')) ->render($this, isset($config) ? $config : null);