OpenEdge GUI ABL window with a browse compared to an OpenEdge GUI for .NET form with a grid

Whether you are working with the OpenEdge GUI or with the OpenEdge GUI for .NET, the steps you take to create a functional window with a browse or data grid are similar using both technologies—only the syntax is different. In either case you need to do the following:

  • Create the window or form
  • Define the query
  • Enable the browse or data grid
  • Display the window or form
  • Wait for the window or form to close

The following table lists various ABL statements that compare how you build a window with a browse using the OpenEdge GUI compared to building a form with a data grid using the OpenEdge GUI for .NET. Note that the OpenEdge GUI for .NET code assumes the following USING statements:


USING System.Windows.Forms.* FROM ASSEMBLY.
USING Infragistics.Win.UltraWinGrid.* FROM ASSEMBLY.
Table 1. OpenEdge GUI ABL window with a browse compared to an OpenEdge GUI for .NET form with a grid
OpenEdge GUI OpenEdge GUI for .NET
DEFINE VARIABLE C-Win AS HANDLE. 
CREATE WINDOW C-Win ASSIGN . . .
DEFINE VARIABLE custForm 
  AS CLASS Progress.Windows.Form.
custForm 
  = NEW Progress.Windows.Form( ).
DEFINE QUERY custQry FOR Customer
  SCROLLING.
. . .
DEFINE QUERY custQry FOR Customer
  SCROLLING.

. . .
DEFINE VARIABLE custSource AS
  Progress.Data.BindingSource.
custSrc = NEW   Progress.Data.BindingSource(
                          custQry ).
DEFINE BROWSE CustBrowse QUERY
  CustQry . . .
DEFINE VARIABLE custGrid 
  AS UltraGrid.
custGrid = NEW UltraGrid( ).
custGrid:DataSource = custSrc.

DEFINE FRAME Default-Frame CustBrowse 
. . .

ENABLE CustBrowse 
  WITH FRAME Default-Frame 
  IN WINDOW C-Win.
custForm:Controls:Add( custGrid ).
. . .

/* controls enabled by default */
VIEW C-Win.
custForm:Show( ).
WAIT-FOR CLOSE OF THIS-PROCEDURE.
WAIT-FOR Application:Run( custForm ).
ON WINDOW-CLOSE OF C-Win DO:
   APPLY "CLOSE":U TO THIS-PROCEDURE
custForm:FormClosing:Subscribe(
                     Form_Closing ).

METHOD PRIVATE VOID 
    Form_Closing ( . . . ):
  . . .
END METHOD.
ON CLOSE OF THIS-PROCEDURE DO:
  . . .