I want to always display a default value of
ComboBox1 on a
Window1.
How should I do?
my code:
PHP Code:
function Label1JSClick($sender, $params)
{
?>
//Add your javascript code here
Window1.open();
<?php
}
PHP Code:
function ComboBox1BeforeShow($sender, $params)
{
$this->ComboBox1->Clear();
$this->ComboBox1->ItemIndex =2;
$ds = $this->Datasource1->DataSet;
$ds->first();
// iterate through all records and add them
while (!$ds->EOF)
{
// for example use $ds->LAST_NAME to access the fields value
$this->ComboBox1->AddItem($ds->aaa , null , $ds->bbb);
$ds->next();
}
}