Parameters by Container

In this example, a container passing parameters through the applications of Grid The first Grid (Grid Samples Orders) is based on the orders table and the second (Samples Orders Details Grid) is based on orders_details.

Creating Application Grid

1. Create a new Grid application based on the table order_details.


2. In the application menu click in Select Fields.


3. Remove the fields: OrderDetailsID


Creating Application Grid

4. Create a new Grid application based on the table orders .


5. In the application menu click in Select Fields.


6. Remove the fields: RequiredDate, ShipVia, Freight, ShipCountry, ShipRegion, ShipState, ShipCity, ShipName, ShipAddress, ShipPostalCode


Creating Application Container

7. Create a new container application.


8. In the application menu open the container and then click in Settings.


9. Click Add Column.


10. In the first widget, click the Edit Properties link to add an application to the container.

11. Set the container title, the link to the application's samples_grid_orders and samples_grid_order_details and click Save.


12. Menu: View -> Source Code.


13. Select Module of application and click on button SHOW.


14. Displays the code to check the second column of the application "Grid Samples Orders Details" which will receive the parameter.

We note the name of the iframe: iframe-id-widget4


15. Accessing the application again samples_grid_orders.


16. Click in New Field.


17. On quantity type 1 and click in Next.


18. Create the fields according to the image below.


19. Select Event OnRecord.


20. Code in the event OnRecord .


Event:     OnRecord


Atributes Explication
<a href='#'></a> Create a Link
onclick=\"parent.document.getElementById('id-iframe-widget4') Clicking on a link with the "parent" will call the application that the iframe
contentWindow.document.location.href = '../samples_grid_order_details/samples_grid_order_details.php'+'?ord=".{OrderID} Redirect for the application which will call, passing the parameter via GET
<img src='../_lib/img/details.png' border = '0' Title='Details'/></a>"; Image used in the application


21. Accessing the application again samples_grid_orders_details.


22. Select Event Oninit.


Event OnInit Explication
Code if(isset($_GET['ord']))
[ord] = "OrderId = " . $_GET['ord'];
[ord] = "1 = 1";
check the parameter passed by the link


23. Select SQL.

Report the SQL according to the image below.

Varibled [ord] assigned tha condition Where.