phpgrid lookup field

Questionsphpgrid lookup field
Tarek asked 3 years ago

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 ?

1 Answers
Abu Ghufran answered 3 years ago

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.

Your Answer

1 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



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!