Information générale
Catégorie:
Codage, syntaxe et commandes
>>Using VFP 3 to do a Point of Sale System
>>
>>where the item code is entered in a text box and in the valid method i add the item direct into the table.
>>and call
>>thisform.grid1.refresh
>>
>>the grid's control source is the table field
>>
>>enter one or two items the grid refreshes ok, but if you place a third item it doesn't show.
>>
>>i have to click on the grid for it to refresh. this is probably a bug.
>>
>>Anyone experienced this? Tried to solve using set focus on the valid method - which incidentally doesn't work.
>
>Normally Refresh should work in your case. Just check couple things:
>1. Make sure that grid RecordSource (not ControlSource) is table.field.
>2. You can use Nodefault in Valid event to support needed SetFocus().
>3. If it still doesn't work but manual mouse clicking saves the situation you can click programmatically using MOUSE command. I use it sometimes not for standard but Active-X controls.
Thank you for your suggestions. The third option worked but i can't get the cursor to return to the text field. i used Nodefault in the valid method and then setfocus.
In desperation i added
go bottom
and holy cow it worked! The grid is finally refreshed, and i feel refreshed also :)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement