Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with lost focus of textbox in grid column
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949487
Message ID:
00949605
Views:
13
Jim
Thanks for hanging in there.
I just discovered that the BRCC fires twice. Anotherwards no matter what record I'm on in the grid and arrow down or reenter an amount(last field), the BRCC fires twice and adds the 2 blank records, weird.
With just LostFocus, it does the same behavior except only on down arrow.
I created a form with only the grid and the code just in the grid and it still does the same. I don't get it. I guess the grid is firing for the Allowadd New and "darrown" in lost focus. ??????

>Chuck,
>
>Sorry, I misread your original post and thought you were doing this from the lostfocus event. In any case, would the following work?
>
>LPARAMETERS nColIndex
>IF nColIndex = 5 AND NOT LASTKEY() = 5 AND NOT LASTKEY() = 24
>   KEYBOARD '{DNARROW}'
>ENDIF
>
>
>Regards,
>Jim
>
>>The problem is that the user does not want to press the down arrow, just have the cursor move to the next record for input BUT...if editing another record the default AllowAddNew behavior makes the cursor jump to the last record and arrow down no matter what record you are on.
>>My code is like this in the beforerowcolchange event:
>>
>>* Method..: grdcentrex.beforerowcolchange
>>* in the last column (amt) and last keystroke is not "up-arrow"
>>* any other key go down
>>LPARAMETERS nColIndex
>>IF nColIndex = 5 AND LASTKEY()#5
>>    KEYBOARD '{DNARROW}'
>>ENDIF
>>
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Reply
Map
View

Click here to load this message in the networking platform