In a simplified order entry view made by the wizard, I have a button for making the cursor stay on the price column to simplify pricing, and another button to reset this function so new lines can be entered. When the Enter Price button is pressed, the cursor moves to the price column and the cell on the current line is focused. Perfect!

But when the Enter Item button is pressed, the Item code and Amount columns are showed with black text, they were grayed before, but the cursor stay on the on the Price column. However, if the Enter Item key is pressed a second time, the cursor moves to the Item code column. Why is it necessary to press the Enter Item button twice in this case? It would be very confusing for a user.



Code:
    Object oButton1 is a Button
        Set Location to 13 295
        Set Label to "Enter item"
    
        Procedure OnClick
          Set pbFocusable of (oART_KOD(oDetailGrid(Self))) to True 
          Set pbFocusable of (oLEVOFFR_ANT_BEST(oDetailGrid(Self))) to True
          Set pbFocusable of (oLEVOFFR_PRIS(oDetailGrid(Self))) to True
          Send MoveToFirstEnterableColumn of (oDetailGrid(Self))
          Send Activate to (oDetailGrid(Self))
        End_Procedure
    
    End_Object


    Object oButton2 is a Button
        Set Location to 14 383
        Set Label to "Enter price"
    
        Procedure OnClick
          Set pbFocusable of (oART_KOD(oDetailGrid(Self))) to False 
          Set pbFocusable of (oLEVOFFR_ANT_BEST(oDetailGrid(Self))) to False 
          Set pbFocusable of (oLEVOFFR_PRIS(oDetailGrid(Self))) to True
          Send MoveToFirstEnterableColumn of (oDetailGrid(Self))
          Send Activate to (oDetailGrid(Self))
        End_Procedure
    
    End_Object
Bengt