how to get data into a cursor from grid in foxpro?
how to get data into a cursor from grid in foxpro?
(OP)
I have a grid as Grid1 and the columns are as below.
Now I want to do something like this. When I'm selecting a row from my grid I want to take that row data into a cursor. As an example if I select 1st Row I want to get Stylecode, OrderQty, ReceiveQty into a cursor as below.
How can I do this?
Thank you
CODE -->
Stylecode OrderQty ReceiveQty CD123 100 75 NHG345 125 125 JK87 500 200
Now I want to do something like this. When I'm selecting a row from my grid I want to take that row data into a cursor. As an example if I select 1st Row I want to get Stylecode, OrderQty, ReceiveQty into a cursor as below.
CODE -->
Stylecode OrderQty ReceiveQty CD123 100 75
How can I do this?
Thank you
RE: how to get data into a cursor from grid in foxpro?
In the snippet below I'm copying the data to a temporary table (sited in the folder
specified in m.Tempdir such as c:\temp\myapp\) but you could use a SQL statement to
put it into a cursor instead.
CODE
Regards
ing
Griff
Keep
I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
There is no place like G28 X0 Y0 Z0
RE: how to get data into a cursor from grid in foxpro?
CODE -->
Which assumes the Grid1 is a) directly on the form and b) has an alias as recordsourcetype.
If the grid recordsourcetype is something different, please describe what it is.
Chriss
RE: how to get data into a cursor from grid in foxpro?
You can also use SCATTER or SCATTER TO NAME to put the values of the current records into variables or a single object variable, which will have Stylecode, OrderQty, and ReceiveQty as properties. And such an object or single variables can be passed on to a second form, even if it has its own private data session. Besides, you could also just pass on the RECNO().
Chriss