This article was brought to you by the guys from VDF-GUIdance.
For more DataFlex targeted articles see http://www.vdf-guidance.com


CheckboxColumnGrid

by Vincent Oorsprong

Summary

This grid subclass adds a checkbox column to support the selection of an entire row.
Size: 31 KB Download
Date Created: 11/11/1999
Date Updated: 11/11/1999
Author: Vincent Oorsprong
Company: Data Access Europe B.V.


This class makes it possible to create a grid in which one column (user definable) shows a checkbox to indicate whether the current row is considered selected or not. The standard grid behaviour is changed so to make it possible to toggle the checkbox from true to false and vice-versa when the user clicks anywhere in the row. The best part is, that it is fully IDE-compatible.
Here's a screenshot of an example (included) with the adapted grid class in action.
Following are the steps needed to include this package into the order entry example. These steps will create the subclass locally into the order entry workspace, but you can always change this to your global settings.
- Copy the .dfc, .dfo and .bmp files to the Order\IdeSrc folder.
- Copy the .cls and .dg files Order\AppSrc folder
- Open the IDE in the order entry sample workspace
- Select 'Maintain Classlists' from the Tools menu (Make sure no program or component is open at this time, otherwise you cannot select this from the menu)
- Click on the workspace tabpage and press the Add button, enter the necessary information
- Select Add and the new class is registered into the IDE. That's it, now you can use this new class from within the IDE. The following steps are included for the ready made example that is included.

- Select 'Register external component' from the 'Components'-menu
- In the dropdown box select a dialog object
- Now click on the prompt button of item package name and select the file Reindex.dg. This componnent was created using the IDE. This means that the IDE will fill in all the rest of the necessary info.
- Open the program 'order entry sample application'.
- Include the following code into the top of the program
Use Reindex.dg

Procedure DoPopupReindexDialog
Send Popup To (oReindexDialog(Self))
End_Procedure DoPopupReindexDialog

On_Key Key_Alt+Key_R Send DoPopupReindexDialog
- Compile the program and run it. Press the keys <Alt><R> to invoke the example.

Download



checkboxcolumngrid.zip ~ 31kb