I'll go out on a limb and guess "Windows" since you mentioned GUI but what version of OpenEdge might you be using?
It is also always helpful to show an example of the code that you are having trouble with. It is much easier to provide helpful suggestions when there is actual code to look at.
GUIs don't just appear out of thin air. Directly or indirectly, you have written some code that puts a datagrid on a screen. Maybe you just futzed around with a mouse using an IDE and a visual designer or something but there is code hiding somewhere in there. But if you did just mouse around and click stuff and can't find the code then perhaps you could post a bunch of screen captures showing the various properties and stuff. Or a video of how you created whatever it is that isn't working the way that you want it too. That also might be enough of a clue to get you some help.
I have copied the code and adjusted to use a standard System.Windows.Forms.DataGridView and this attached. This will run against the Sports2000 database.
To sort the data, either have a combo box, button or check for any of the columns being clicked and just re-open the query sorting as required. In this example you want to sort by customer name:
Code:
hTopQuery:QUERY-PREPARE("FOR EACH ttCustomer BY ttCustomer.name").
hTopQuery:QUERY-OPEN().
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.