public function RenderFund(RecurringDonationItems $objItem = null) { if (!$objItem) { return '<strong>TOTAL SUBMISSION</strong>'; } $lstFunds = $this->GetControl('lstFunds' . $this->dtgDonationItems->CurrentRowIndex); $txtFund = $this->GetControl('txtFund' . $this->dtgDonationItems->CurrentRowIndex); if (!$lstFunds) { $lstFunds = new QListBox($this->dtgDonationItems, 'lstFunds' . $this->dtgDonationItems->CurrentRowIndex); $lstFunds->ActionParameter = $this->dtgDonationItems->CurrentRowIndex; $lstFunds->AddAction(new QChangeEvent(), new QAjaxAction('lstFunds_Change')); $txtFund = new QTextBox($this->dtgDonationItems, 'txtFund' . $this->dtgDonationItems->CurrentRowIndex); $txtFund->Visible = false; if (!$objItem->StewardshipFundId) { $lstFunds->AddItem('- Select One -', null); } foreach (StewardshipFund::LoadArrayByExternalFlag(true, QQ::OrderBy(QQN::StewardshipFund()->ExternalName)) as $objFund) { $lstFunds->AddItem($objFund->ExternalName, $objFund->Id, $objFund->Id == $objItem->StewardshipFundId); } $lstFunds->AddItem('- Other... -', false); } return $lstFunds->RenderWithError(false) . ' ' . $txtFund->RenderWithError(false); }