I'm doing a a basic phpgrid, i want to implement lookup drop down list field.
Meaning, when add new or edit, i want some field to populate from certain table from DB and show as dropdown list, instead of writing it myself as text.
is there any examples ?
The API for lookup dropdown is supported in full version.
However, i am telling an alternate way.
To make dropdown, you need this column setting:
$col["edittype"] = "select";
$col["editoptions"] = array("value"=>'10:$10;20:$20;30:$30;40:$40;50:$50');
Now the value "key:value;key:value;key:value" can be from any database but you need to fetch that data manually byself using php code and fill in as key:value pairs.
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!