drop down

Questionsdrop down
german asked 6 years 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 6 years 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
Grid 4 PHP Framework
 
Your Answer

17 + 11 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?