Consultor Eletrônico



Kbase P122793: How to get the ROWID of the current record on 'MOUSE-SELECT-DBLCLICK' of a SmartDataBrowser or a reg
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/14/2007
Status: Unverified

GOAL:

How to get the ROWID of the current record on 'MOUSE-SELECT-DBLCLICK' of a non smart browse row?

GOAL:

How to get the ROWID of the current record on 'MOUSE-SELECT-DBLCLICK' of a SmartDataBrowser row?

FIX:

1. In a regular non smart browse widget, the following 'MOUSE-SELECT-DBLCLICK' trigger messages the ROWID of the current record when the user mouse double clicks a row:
ON MOUSE-SELECT-DBLCLICK OF BROWSE-1 IN FRAME DEFAULT-FRAME DO:
FIND CURRENT Customer NO-LOCK.
MESSAGE STRING(ROWID(customer))
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
2. In a SmartDataBrowser, the following 'MOUSE-SELECT-DBLCLICK' trigger messages the ROWID of the current record when the user mouse double clicks a row:
ON MOUSE-SELECT-DBLCLICK OF br_table IN FRAME F-Main DO:
MESSAGE DYNAMIC-FUNCTION('getRowIdent':U)
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
3. In both of the above cases, the displayed value is a string representation of the ROWID of the current record. Use the TO-ROWID Function to obtain the actual ROWID of the current record. For example, the following statement FINDs the customer record referenced in the second example above:
FIND Customer WHERE ROWID(Customer) TO-ROWID(DYNAMIC-FUNCTION('getRowIdent':U)).