Hi,
Can I add the cell value in die get_dropdown_values query.
Example:
$col = array();
$col[“title”] = “primary key”;
$col[“name”] = “pkey”;
$col[“fixed”] = true;
$col[“width”] = “460”;
$col[“editable”] = true;
$col[“hidden”] = false;
$col[“resizable”] = true;
$col[“search”] = true;
$str = $g->get_dropdown_values(“select distinct pkey as k, name as v from qualifications Where pkey = “$col[“name”] = “pkey”;””);
so the drop down will only show where the pkey match current cell pkey.
Kind Regards
Try following:
$str = $g->get_dropdown_values(“select distinct pkey as k, name as v from qualifications”);
$col[“editoptions”][“value”] = $str;
$col[“editoptions”][“onload”][“sql”] = “select distinct pkey as k, name as v from qualifications Where pkey = ‘{pkey}'”;
This will reload dropdown and use onload-sql query to fill dropdown.
Hi,
I used that from the start but I am having an issue using the Onload function, when I inline edit and the select box states “loading” and before it updates and I save the row edit , the data get saved as blank. So data gets lost.
So that is why I wanted to query it from the start using the current column value.
Seems then I wont be able to accomplish what i wanted,
Thanks for the help.