![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Nested grids using treeview This sample shows how to use nested grids in a treeview format. To build this application it is created two grids, the first based on the Orders table (Nested Grid) and the second based on the Customers table(Master Grid). Creating the "detail" or "nested" grid 1. Create a new grid application based on the orders table 2. Set up Table Width and Table Width Unit to 100 and Percent respectively.
3. On the application menu, click in the SQL item.
4.Add the lines below to the SQL existing statement, the content between [square_ brackets] is a global variable, using global variables it is possible to pass parameters between applications. Nested grids usually require a parameter to run. WHERE 5. On the ScriptCase toolbar click in the Generate Source.
Creating the "master" grid 6. Create a new application based on the customers table. 7. Access the Toolbar menu item.
8. On the Top Toolbar enable the buttons: First, Previous, Next, Last, Rows Limit, PDF and Print. Use Center alignment .
9. Click in the Options edition link.
10. Turn off all the options except Display Titles
Creating the subgrid link 11. On the application menu open the Nested Grid folder. Also open the Links folder and then click in New Link.
12. For the properties Name and Label type subgrid and Orders respectively. Click in the Create button.
13. Select the grid that will be nested and then click in Next. 14. To the global variable v_customer pass the CustomerID Field, click in the Save button to end this wizard. Setting the option Treeview 15. By default the nested grid would be displayed as a new column on the "master report". To use a treeview, click in the Settings menu. 16. Modify the properties Enable Treeview and Position to Yes and Records bellow respectively.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||