Page 1 of 1
Stand alone Grids, no rpg? Looking for some guidance
Posted: Mon Apr 02, 2012 12:46 pm
by ChrisH
I have read that the ability to create grids to display data are possible without RPG code. Can data selection be incorporated into these, where the selection comes from a field on the form? Examples would be date and drop down.
Re: Stand alone Grids, no rpg? Looking for some guidance
Posted: Mon Apr 02, 2012 3:41 pm
by David
Grids can be created without RPG coding by using the properties under the Grid Data section of properties on the grid widget.
You can fill in database file and fields to use, or you can plug in your own custom SQL statement to use with the "custom sql" property.
Record selection can be done by binding the "selection criteria" (if using datbase file name and fields) to a field in which you move in the WHERE clause before displaying the screen, or by binding the "custom sql" property, if using that, and feeding in the whole SQL query dynamically.
When you create a grid in this way, you would not use any of the normal subfile control properties and you would not WRITE records into the subfile -- rather you would just execute the control record without any subfile control indicators.
Note that grids created in this way are display-only, you cannot perform input operations like CHAIN or READC on them.