Hello Abu
Is it posible to pass info from three independent grids to add a new record on a forth grid with info from the three previous grids?
As a context, there are four tables:
grid A (table A contains -> “Adress of origin”)
grid B (table B contains -> “Adress of Destiny”)
grid C (table C contains -> “characteristics)
I want to generate a new record on a forth grid “D” (Table D) that combines info from the other three grids(table Ab and C)
is it possible?
thisi s the code that im using, but so far, in the forth grid the toolbar is not enabled, like if it were specting that a master grid record be selected to enable the grid. I selected a record on all the grids(A,B and C) and D still it is not anabled.
Pretty late reply, but yes this is doable.
GIven that your last table have ID fields which need to filled by selection of above 3 grids … What you can do is to connect ..
$opt[“add_options”][“afterShowForm”] = ‘function (form) { ………. }’;
And inside this function, you can read the selected row of each grid like:
var list1SelectedId = jQuery(“#list1”).getGridParam(‘selrow’); // returns selected row ID (first column)
and then set in your grid 4 fields, like:
jQuery(“#firstID”,form).val(list1SelectedId);
Hope it helps.
Refer demos/appearance/dialog-layout.php for afterShowForm event demo.