get value of cell on detail grid

Questionsget value of cell on detail grid
abdelilah dourhmani asked 1 week ago

please i use master detail grid i wanna get value of cell selected from master and send it to detail grid to use it in sql query.

$grid[“onSelectCell”] = “function(rowid, celname, value, iRow, iCol){
jQuery(‘#list1’).setSelection(value,true);
}”;

$id = 0;
if (!empty($_GET[“value”]))
{
$id = $_GET[“value”];
}

$grid->select_command = “SELECT * FROM preventive_detail WHERE day= $id”;

1 Answers
Abu Ghufran Staff answered 14 hours ago

Please refer:

https://www.gridphp.com/demo/demos/master-detail/master-detail.phps

Following code will pass 3 fields from selected row of parent to detail grid as querystring and can be used in detail grid query using $_GET. Refer above code for how to use it in detail grid.

$opt["detail_grid_id"] = "list2";
$opt["subgridparams"] = "client_id,gender,company";
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

18 + 15 =

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?