I would like to specify only one field as dropdown without specifying the other fields in the table.
Can I also have a simple example of dropdown involving only one table. Dropdown.php involves two tables invheader and clients
If you want to customize any specific column properties, and let other columns be displayed from table definition, you can pass 2nd argument of `set_columns($cols,true)` to `true`. e.g.
$col = array();
$col["name"] = "company";
$col["edittype"] = "textarea";
$cols = $col;
You can make dropdown values based on passed query. It could be from same table.e.g.
$col["edittype"] = "select"; // render as select
$str = $g->get_dropdown_values("select productid as k, productname as v from products");
$col["editoptions"] = array("value"=>$str);
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!