drop down

Questionsdrop down
german asked 1 year ago
sir,

I have a problem in the drop down.
The data is loaded from a table invheader
and the drop down should contain the id only from clients which should not be in invheader.
But in view it should display the data from invheader.

since we say "id not in invheader the grid shows empty grid for the field"

Please help me to solve the issue.


Ex:
$str
= $g->get_dropdown_values("select distinct client_id as k, name as v from clients
where client_id not in ( select client_id from invheader"
); $col["editoptions"] = array( "value"=>$str );
1 Answers
Abu Ghufran Staff answered 1 year ago

Hi,
You can set:
$str = $g->get_dropdown_values(“select distinct client_id as k, name as v from clients”);
$col[“editoptions”] = array(
“value”=>$str
);

and then filter it on loading dropdown in edit mode.

$col[“editoptions”][“onload”][“sql”] = “select distinct client_id as k, name as v from clients where client_id not in ( select client_id from invheader)”;

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

18 + 10 =

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:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!