I have a master-detail program. In the detail I have a combo field. How can I make the “select” dynamically assembled based on a field of the master grid.
Example :
$codContratoCabecera = $_GET[“codContratoCabecera”];
$codContratoCabecera is the field that I send to assemble the detail grid and is the value that I want to use in the “WHERE” of the “SELECT”. Thank you
$col = array();
$col[“title”] = “Practica”;
$col[“name”] = “codNomenclador”;
$str = $g->get_dropdown_values(“SELECT codNomenclador AS k, practica AS v FROM pro_proveedores WHERE codContratoCabecera=’$codContratoCabecera'”);
$col[“stype”] = “select”; // enable dropdown search
$col[“searchoptions”] = array(“value”=>$str, “separator” => “:”, “delimiter” => “;”);
$col[“edittype”] = “select”;
$col[“editable”] = true;
$col[“editoptions”] = array(“value”=>”:;”.$str, “separator” => “:”, “delimiter” => “;”);
$col[“formatter”] = “select”; // Muestra el valor y no el codigo
$col[“width”] = “70”;
$col[“show”] = array(“list”=>false, “view”=>false);
$cols[] = $col;
This requirement is recently implemented in the latest build.
If it’s still required, updated version can be requested here.