/**
  * Create and setup QListBox lstSmartGroup
  * @param string $strControlId optional ControlId to use
  * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself
  * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query
  * @return QListBox
  */
 public function lstSmartGroup_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     $this->lstSmartGroup = new QListBox($this->objParentObject, $strControlId);
     $this->lstSmartGroup->Name = QApplication::Translate('Smart Group');
     $this->lstSmartGroup->AddItem(QApplication::Translate('- Select One -'), null);
     // Setup and perform the Query
     if (is_null($objCondition)) {
         $objCondition = QQ::All();
     }
     $objSmartGroupCursor = SmartGroup::QueryCursor($objCondition, $objOptionalClauses);
     // Iterate through the Cursor
     while ($objSmartGroup = SmartGroup::InstantiateCursor($objSmartGroupCursor)) {
         $objListItem = new QListItem($objSmartGroup->__toString(), $objSmartGroup->GroupId);
         if ($this->objSearchQuery->SmartGroup && $this->objSearchQuery->SmartGroup->GroupId == $objSmartGroup->GroupId) {
             $objListItem->Selected = true;
         }
         $this->lstSmartGroup->AddItem($objListItem);
     }
     // Return the QListBox
     return $this->lstSmartGroup;
 }
 /**
  * Create and setup QListBox lstSmartGroup
  * @param string $strControlId optional ControlId to use
  * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself
  * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query
  * @return QListBox
  */
 public function lstSmartGroup_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     $this->lstSmartGroup = new QListBox($this->objParentObject, $strControlId);
     $this->lstSmartGroup->Name = QApplication::Translate('Smart Group');
     $this->lstSmartGroup->AddItem(QApplication::Translate('- Select One -'), null);
     // Setup and perform the Query
     if (is_null($objCondition)) {
         $objCondition = QQ::All();
     }
     $objSmartGroupCursor = SmartGroup::QueryCursor($objCondition, $objOptionalClauses);
     // Iterate through the Cursor
     while ($objSmartGroup = SmartGroup::InstantiateCursor($objSmartGroupCursor)) {
         $objListItem = new QListItem($objSmartGroup->__toString(), $objSmartGroup->GroupId);
         if ($objSmartGroup->GroupId == $this->objGroup->Id) {
             $objListItem->Selected = true;
         }
         $this->lstSmartGroup->AddItem($objListItem);
     }
     // Because SmartGroup's SmartGroup is not null, if a value is already selected, it cannot be changed.
     if ($this->lstSmartGroup->SelectedValue) {
         $this->lstSmartGroup->Enabled = false;
     }
     // Return the QListBox
     return $this->lstSmartGroup;
 }