Dear Abu. I would like to know if you can use a parameter sent from the master through the command:
$opt [“detail_grid_id”] = “list2”;
$opt [“subgridparams”] = “codPlanningHead, codCategory, planningIntensity, planningTypeExercise”;
I would like to use the parameter “codCategory” in the “where” where the “select” $str = “SELECT minutecode AS k, minute AS v FROM minutes WHERE …” is defined
$col = array ();
$col [“title”] = “Minutes”;
$col [“name”] = “codMinuto”;
$str = $ g-> get_dropdown_values (“SELECT minutecode AS k, minute AS v FROM minutes”);
$col [“stype”] = “select”; // enable dropdown search
$col [“searchoptions”] = array (“value” => $ str, “separator” => “:”, “delimiter” => “;”);
$col [“edittype”] = “select”;
$col [“editoptions”] = array (“value” => $ str, “separator” => “:”, “delimiter” => “;”);
$col [“formatter”] = “select”;
$col [“editable”] = true;
$col [“width”] = “20”;
$col [“align”] = “center”;
$col [“visible”] = “sm +”;
$cols [] = $ col;
Hi,
Yes, that’s doable.
You can get master grid passed parameters in detail using:
$id = intval($_GET[“rowid”]);
$gender = $_GET[“gender”];
And to use in select dropdown, you need to set like following. The onload-sql is the query with WHERE clause. The previous is also required.
$col = array();
$col[“title”] = “Invoices”;
$col[“name”] = “note”;
$col[“width”] = “100”;
$col[“search”] = true;
$col[“editable”] = true;
$col[“edittype”] = “select”;
$str = $grid->get_dropdown_values(“select distinct note as k, note as v from invheader”);
$col[“editoptions”] = array(“value”=>”:;”.$str);
$sql = “select distinct note as k, note as v from invheader WHERE client_id = $id”;
$col[“editoptions”][“onload”][“sql”] = $sql;
$cols[] = $col;