Hi there, is it possible to have 3 grids as per your demo looking at 3 different tables? I have clients, notes & tasks tables are with client_id field.
I can set the master & notes or master & tasks but cant seem to have all 3 on one page. The last table, tasks does not reference the client_id from the master?
Sample code is http://pastebin.com/fbFjxL9c if it helps at all?
To connect master with 2 grids, set:
$opt["detail_grid_id"] = "list2,list3";
Hi Abu, thank you I have already added that to code but no joy. If I change the query to an actual value it does display that data but on changing back to parent id it doesn't pull through in list3..
WHERE client_id = $id"; works in list2 but not list3, changing to WHERE client_id = 5"; for example outputs client_id 5 from tbl_tasks?
I also note on the demo that we cant change columns [hide, title etc] as I I set $grid->set_columns($cols); on list 3 it includes list 2 columns in list 3 grid?
Reset all variables before using in other grid.
For e.g. if var $cols is used in first grid, then null it before using in next.
$cols = array();
Same applies to all others which are reused.
Hi Abu, I have list 2 & 3 working now but still am unable to set columns on grid 3, for example a date column or hiding columns when adding?
I notice on your master-multi-detail demo that the data column in list 3 is formatted as a date however setting the client_id column as hidden doesn't hide it?
$col = array();
$col["title"] = "Client Id";
$col["name"] = "client_id";
$col["width"] = "10";
$col["editable"] = true;
$col["hidden"] = true;
$cols = $col;
In list 2 you have $grid->set_columns($cols); but I cant add that to list 3 to achieve the above?
Refer this: http://pastebin.com/5rXHLie0
My suggestion is, when ever you use $cols and set_columns($cols) … reset them. e.g.
$cols = array();
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!