Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Enabling columns in the browse

> In this section, you experiment with browse columns.

> | To enable some of the columns in the OrderLine browse:

> 1. Add this `ENABLE` phrase to the browse definition:

>     DEFINE BROWSE OlineBrowse
>       QUERY OlineQuery NO-LOCK DISPLAY
>             ttOline.Ordernum
>           .
>           .
>           .
>         ENABLE ttOline.Price ttOline.Qty ttOline.Discount
>         WITH SEPARATORS 7 DOWN ROW-HEIGHT-CHARS .57.

> 2. You can also remove the `NO-ROW-MARKERS` keyword to see the effect of row markers in your updateable browse:

> Now that the browse is updateable there is a row marker at the beginning of each row, if you don’t specify the `NO-ROW-MARKERS` keyword, to indicate which row is selected. This is useful because the way a row is highlighted is very different depending on whether the user happens to click in an enabled or read-only column:

> - If the user selects a row by clicking on a column that isn’t enabled, the entire row is highlighted to indicate the selection (as in the first row of the Order browse above), just as if the browse had no enabled columns.

> - If the user selects a row by clicking on an enabled column, then that cell is highlighted and a cursor appears in it to let the user change its value, as in the selected row of the OrderLine browse above.

> The user should always click on the row marker to select a row to avoid inadvertently selecting an enabled column when this is not the user’s intent.

> If the user selects the Price column for an OrderLine, or the Qty or Discount, which are all enabled, the browse cell for that column behaves in much the same manner as a fill-in field. Tabbing or clicking moves the user from one updateable cell to the next. If the user changes the value, then that value is assigned when the user leaves the row. But assigned where? Because this is a browse of a temp-table, the value is assigned only back to the row in the temp-table. If the user browses an actual database table, then the update goes back to the database unless you included the `NO-ASSIGN` keyword in your browse definition. You’ll learn more about updating records in Chapter 16, "Updating Your Database and Writing Triggers," so you won’t do any more with enabled columns for now.

> Note: In character interfaces, a key sequence (ESC+R) toggles between two modes, to select rows or edit cells. By default, the selected row is the highlighted row that you change with `CURSOR-DOWN` and `CURSOR-UP`. Character row markers appear as an asterisk (*). Also, the `EDITOR-TAB` and `BACK-TAB` key functions (usually CTRL+G and CTRL+U) tab from cell to cell.

> One very important fact to remember is that you cannot enable, or turn on, a read-only browse after you have defined it. If you expect to need any of the capabilities of the updateable browser, enable the appropriate fields in the definition and then use the `READ-ONLY` logical attribute to temporarily turn them off at run time.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095