two master to one subgrid

Questionstwo master to one subgrid
Jorge Neri asked 5 years ago

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.

View post on

1 Answers
Abu Ghufran Staff answered 5 years ago

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:


Hope it helps.

Refer demos/appearance/dialog-layout.php for afterShowForm event demo.

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

8 + 5 =

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?