Consultor Eletrônico



Kbase P177721: UltraGrid ActiveRow & SelectedRow point to different rows when user clicks to select row then drags
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/03/2011
Status: Unverified

SYMPTOM(s):

UltraGrid is configured to allow single row selection only

User clicks on row with mouse, holds mouse down, scrolls through the UltraGrid then releases the mouse on a different row

The :ActiveRow and :SelectedRow properties now point to different rows

FACT(s) (Environment):

Windows
OpenEdge 10.2x

CAUSE:

Bug# OE00203475

CAUSE:

The UltraGrid does not expect to be interacted with in this way (and in fact the users are not intending to this, it is happening by accident) so it gets confused as to what row the user really selected.

FIX:

Modify the application and an AfterSelectChanged event to the UltraGrid that contains the following code (which will change the :SelectedRow property to conform to the row the user selected first with the mouse before they unintentionally scrolled with the mouse:

DEFINE VARIABLE oRow AS UltraGridRow NO-UNDO.

If VALID-OBJECT(ultraGrid1:ActiveRow) THEN
DO:
oRow = ultraGrid1:ActiveRow.
ultraGrid1:Selected:Rows:Clear().
ultraGrid1:Selected:Rows:Add(oRow).
END.