Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet another Grid Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Yet another Grid Question
Miscellaneous
Thread ID:
00012677
Message ID:
00012677
Views:
65
Sorry I have more Questions on My grid

master_list.dbf
set filter to Invoice = CurrInvoice

1 Grid has 7 collumns
2 Collumns 3 +4 are in Collumn 7
3 Every Collumn calls the same code
4 Every Refresh event (Coluumn) = thisform.refresh()
5 Code is in grid2.Before.RowColChange.

Ok

In the first Collumn a 6 digit part number is entered
If the enter key is hit a search is done to Find the Part Number -- Works Fine
The description, Price, and Qty of 1 is placed in the database -- Works Fine

The first line contains nodefault. This was placed in the code to prevent the return key from going to the next field. It needs to go to the fourth field
It goes to the proper Collumn -- Works Fine

Here is the Problem !!

Nothing shows up on the grid untill I hit the enter key 2x
It goes to the correct Collumn but Nothing Happens untill I hit Enter Again.
--- U N L E S S --
I am using trace
Then it works Wonderly

See Code Below I lost The instructions on keeping the indent Sory

Thanx
Chris



PARAMETERS nColIndex

if lastkey() = 13 or lastkey() = 9
nodefault
if empty(descriptio)
select master_lst && Select
set order to 1 && Index on item Number

select as400mas && Material List
set order to 1 && Index by item

if seek(master_lst.item) && Is that ticket on file
replace;
master_lst.descriptio with as400mas.descript;
master_lst.qty with 1;
master_lst.item_cost with as400mas.lst;
master_lst.list with as400mas.lst;
master_lst.total_cost with master_lst.qty * master_lst.item_cost
endif

select master_lst

if lastline and !empty(master_lst.item)
nothing = add_one() && Add a line
endif

thisform.main_tabs.transaction.grid2.refresh()
thisform.refresh()

nothing = update_() && Re calculate totals
thisform.main_tabs.transaction.grid2.activatecell(thisform.main_tabs.transaction.grid2.ActiveRow,4)
else
thisform.main_tabs.transaction.grid2.activatecell(thisform.main_tabs.transaction.grid2.ActiveRow,1)
keyboard '{dnarrow}'
endif

endif

thisform.main_tabs.transaction.grid2.refresh()
thisform.refresh()
Christopher Yerry
PC Programmer\Analyst Weather Shield Windows Inc.

Visual Fox Pro , Visual Basic
cyerry@weathershield.com
Next
Reply
Map
View

Click here to load this message in the networking platform