I want the table still rendering the original data if the value is not in the edition options list. Anyway we can achieve it? Current output is empty if there is field’s value not defined in the valid_input table as bellow.
$col = array();
$col[“name”] = “yyy”;
$col[“title”] = “YYY”;
$str = $g->get_dropdown_values(“select distinct valid_input as k, valid_show as v from option_table where table_name=’xxx’ and column_name=’yyy’ order by 1”);
$col[“stype”] = “select”;
$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value”=>$str);
$col[“searchoptions”] = array(“value” => $str, “separator” => “:”, “delimiter” => “;”);
$col[“searchoptions”][“sopt”] = array(“bw”);
$col[“formatter”] = “select”;
$cols[] = $col;
Hi,
Apologies for the delay. Ticket somehow get missed.
To show all values, you must remove conditions from query:
$str = $g->get_dropdown_values(“select distinct valid_input as k, valid_show as v from option_table”);
$col[“stype”] = “select”;
$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value”=>$str);
But to have filtered values in edit dialog, you need to set:
$col[“editoptions”][“onload”][“sql”] = “select distinct valid_input as k, valid_show as v from option_table where table_name=’xxx’ and column_name=’yyy’ order by 1”;