Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid/view requery problem
Message
 
À
09/12/1997 16:22:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00064790
Message ID:
00065219
Vues:
34
>move your lost focus code to column 3 and remove it from combo box


>Another "quick" question. I've got a grid with 3 columns whose recordsource is a view.
>>Col_1 is text (and what the order is based on)
>>Col_2 is a vendor combobox
>>Col_3 is text.
>>
>>I've designed the combobox to requery the source view after a change/entry into the cell (LostFocus) so the change/addition is reflected in the grid.
>>
>>Well, when I add a new record/row, I enter text in Col_1, fine. I select a vendor from the combo in Col_2, fine, but once I lose focus on that cell, my view is requeried and the items in the grid are resorted based upon the new entry in Col_1, so before the user finishes entering data for the new record, i.e. Col_3's text, the grid's data jumps due to the requery/sort. You then have to find where you left off and return to the appropriate Col_3 cell to complete the entry. I'm afraid this is going to confuse my users.
>>
>>Any suggestions on how to move the focus to the same row's Col_3 cell?
>>
>>I tried adding the following lines but confused the heck out of my grid :^) :
>> local lnmid
>> lnmid=nmid && nmid is my primary key for my data table
>> on which the view is based
>> {save the vendor id back to the original data table and perform the
>> view requery}
>> locate for nmid=lnmid
>> thisform.pfdatacom1.pNetMgmtHW.grdnetmgmt.column3.text1.setfocus
>>
>>MTIA!
>>
>>Mandy
>
>Sorry, I cannot understand why you requery the view in Combo.LostFocus. The idea of 'requery' is to retrieve data changes which might happen outside the view, e.g. changes made by another user, or you change data in another form directly in underlying table, etc. When you make selection from the combo, you just change appropriate field in the same view, i.e. you have it already in grid.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform