Пример #1
0
 protected function CreateSecondEditorControl()
 {
     $controlName = StringUtils::ReplaceIllegalPostVariableNameChars($this->GetFieldName()) . '_secondvalue';
     if (!$this->useComboBox) {
         $result = new AutocomleteComboBox($controlName, $this->linkBuilder);
         $result->SetHandlerName($this->handlerName);
         $result->SetSize('155px');
     } else {
         $result = new ComboBox($controlName, $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
         $this->lookupDataset->Open();
         while ($this->lookupDataset->Next()) {
             $result->AddValue($this->lookupDataset->GetFieldValueByName($this->idColumn), $this->lookupDataset->GetFieldValueByName($this->valueColumn));
         }
         $this->lookupDataset->CLose();
     }
     return $result;
 }