Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid/view requery problem
Message
From
09/12/1997 16:00:00
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid/view requery problem
Miscellaneous
Thread ID:
00064790
Message ID:
00064790
Views:
64
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
Next
Reply
Map
View

Click here to load this message in the networking platform