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
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)”;
Your Answer