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
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";
Your Answer