'Lease.id', 'hidden' => true); $cols['Lease'] = array('index' => 'Lease.number', 'formatter' => 'id'); $cols['Unit'] = array('index' => 'Unit.name', 'width' => '50', 'align' => 'center'); $cols['Customer'] = array('index' => 'Customer.name', 'formatter' => 'longname'); $cols['Rent'] = array('index' => 'Lease.rent', 'formatter' => 'currency', 'hiddenz' => true); $cols['Deposit'] = array('index' => 'Lease.deposit', 'formatter' => 'currency', 'hiddenz' => true); $cols['Signed'] = array('index' => 'Lease.lease_date', 'formatter' => 'date'); $cols['Move-In'] = array('index' => 'Lease.movein_date', 'formatter' => 'date'); $cols['Move-Out'] = array('index' => 'Lease.moveout_date', 'formatter' => 'date'); $cols['Balance'] = array('index' => 'balance', 'formatter' => 'currency'); $cols['Comment'] = array('index' => 'Lease.comment', 'formatter' => 'comment'); // Set up search fields if requested by caller if (isset($searchfields)) $grid->searchFields(array('Customer', 'Unit')); // Render the grid $grid ->columns($cols) ->sortField('LeaseID') ->defaultFields(array('LeaseID', 'Lease')) ->render($this, isset($config) ? $config : null);