Fetch selected data in subgrid

QuestionsFetch selected data in subgrid
Modest asked 4 years ago

Hi Abu,

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”);

else

(Insert Query)

 

Note: $received is assigned a value from received field in the subgrid and received field is not in the mastergrid.

 

Your Answer

19 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?