Skip to content

Instantly share code, notes, and snippets.

@simonegrid
Created March 3, 2021 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonegrid/81d929c1c34c36be426a193007ddfedd to your computer and use it in GitHub Desktop.
Save simonegrid/81d929c1c34c36be426a193007ddfedd to your computer and use it in GitHub Desktop.
gridphp
$col = array();
$col["title"] = "Targa";
$col["name"] = "id_targa";
$col["dbname"] = "id_targa";
$col["width"] = "20";
$col["edittype"] = "select";
$str = $g->get_dropdown_values("select id as k, targa as v from veicoli order by targa");
$col["editoptions"] = array(
"value"=>":;".$str,
"onload" => array( "sql"=>"SELECT id as k, targa as v FROM veicoli WHERE id='{id_targa}' ORDER BY targa",
"update_field" => "id_targa" )
);
$col["editable"] = true;
$col["formatter"] = "select";
$col["export"] = false;
$col["stype"] = "select"; // enable dropdown search
$col["searchoptions"] = array("value" => ":;".$str);
$cols[] = $col;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment