Dear Abu. Is there a possibility that a field $ g-> get_dropdown_values, in the WHERE clause can put the value of two fields that have data previously entered?
Example:
$col = array();
$col[“title”] = “Date”;
$col[“name”] = “date”;
$col[“editable”] = true;
$col[“editrules”] = array(“required”=>true);
$cols[] = $col;
$col = array();
$col[“title”] = “Name”;
$col[“name”] = “name”;
$col[“editable”] = true;
$col[“editrules”] = array(“required”=>true);
$cols[] = $col;
$col = array();
$col[“title”] = “Mach”;
$col[“name”] = “codPartido”;
$str = $g->get_dropdown_values(“SELECT codpartido AS k, fecha AS v FROM partidos WHERE name='{name}’ AND date='{date}'”);
$col[“stype”] = “select”;
$col[“searchoptions”] = array(“value” => $str, “separator” => “:”, “delimiter” => “;”);
$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value” => $str, “separator” => “:”, “delimiter” => “;”);
$col[“formatter”] = “select”;
$col[“editable”] = true;
$cols[] = $col;
Thanks.
Hi,
You can get desired results with:
$col = array();
$col[“title”] = “Mach”;
$col[“name”] = “codPartido”;
$str = $g->get_dropdown_values(“SELECT codpartido AS k, fecha AS v FROM partidos”);
$col[“stype”] = “select”;
$col[“searchoptions”] = array(“value” => $str, “separator” => “:”, “delimiter” => “;”);
$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value” => $str, “separator” => “:”, “delimiter” => “;”);
$col[“editoptions”][“dataInit”][“sql”] = “SELECT codpartido AS k, fecha AS v FROM partidos WHERE name='{name}’ AND date='{date}'”;
$col[“formatter”] = “select”;
$col[“editable”] = true;
$cols[] = $col;