How do you get selected data in a subgrid where multiselect is set to true to use it in SQL statement to validate if data exist
$selected_ids = $data[“id”]; // e.g. the selected values from grid 5,7,14 (where “id” is field name of first col)
$sid = $_GET[“client_id”];//Passed from Master Grid (Works fine)
global $grid; // where $grid = new jqgrid(…);
$received = Fetch selected data from the subgrid;//Not in the Master grid
$received = $data[“params”][” received “];//$received is blank when I try assigning it this way
$check_sql = “SELECT COUNT(*) as c FROM clients WHERE received = ‘$received’ “;
$rs = $grid->get_one($check_sql);
if ($rs[“c”] > 0)
phpgrid_error(“Client already has received token”);
Note: $received is assigned a value from received field in the subgrid and received field is not in the mastergrid.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?