Hi Abu,
I have a master/detail form
in Master I have an ID named IDE
I would like to record this IDE in my detail record
with subgridparams, it’s ok in SQL SELECT
$iddoc = $_GET[“IDE”]
and in select * where ID = IDE, it’s correct
more, I would like to fill this IDE in my detail record
but with:
$col[“editoptions”] = array(“defaultValue”=>$iddoc);
it doesn’t work.
what is wrong ?
regards
Hello,
Refer this demo:
https://www.gridphp.com/demo/demos/master-detail/master-detail.php
and code (line 91): This will load client name in detail grid in add dialog. You can have similar code with edit_options for edit dialog.
https://www.gridphp.com/demo/demos/master-detail/master-detail.phps
// fill detail grid add dialog with master grid id
$opt["add_options"]["afterShowForm"] = 'function(frm) {
var selr = jQuery("#list1").jqGrid("getGridParam","selrow");
var n = jQuery("#list1").jqGrid("getCell",selr,"name");
jQuery("#client_id",frm).val( n )
}’;