how to enable keyboard input to select element… too many records to select by list… Thank you
select2 = Solving the problem 🙂
//—PROBLEM HERE -lookup? !!!
$col = array();
$col[“title”] = “adresa”;
$col[“name”] = “adresa”;
$col[“dbname”] = “todos.adresa”; // this is required as we need to search in name field, not id
$col[“width”] = “100”;
$col[“align”] = “left”;
$col[“search”] = true;
$col[“editable”] = true;
$col[“formatter”] = “select”;
$col[“edittype”] = “select”; // render as select
# fetch data from database, with alias k for key, v for value
$str = $g->get_dropdown_values(“select distinct ID as k, Adresa as v from Vytahy”);
$col[“editoptions”] = array(“value”=>$str);
$col[“editoptions”][“dataInit”] = “function(){ setTimeout(function(){ link_select2(‘{$col[“name”]}’); },200); }”;
// to enable multiselect option-když chceš vybrat víc hodnot
//$col[“editoptions”][“multiple”] = true;
$col[“stype”] = “select”; // render as select
$col[“searchoptions”] = array(“value”=>$str,”sopt”=>array(“cn”));
$col[“searchoptions”][“dataInit”] = “function(){ setTimeout(function(){ link_select2(‘gs_{$col[“name”]}’); },200); }”;
$cols[] = $col;
//—STOP PROBLEM