Exercise: Replace a grid with the BBjGridExWidget
A possible solution is at the end of this page.
Try it yourself
- Install BBjGridExWidget on your computer.
- Load the folder as a project into Eclipse.
- Run
Demo.bbjfrom the demos. - Run some other demos in GUI, BUI and DWC.
- Write a DWC program that shows the grid full-screen in the browser. Load all records from the CDStore
CDINVENTORYtable into this grid.
Possible solution
The original course had no solution for this exercise, so this one was written for this book. It assumes the BBjGridExWidget plug-in is installed as described in Install the Plug-In and uses the CDStore demo database that ships with BBj. It loads every record of the CDINVENTORY table with SqlQueryBC and hands the ResultSet to setData, which creates the columns. The solution is in Exercise-BBjGridExWidgetComplete.bbj, and you find all files in 03C_Grid2GridEx.zip.