Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help on Grid
Message
From
28/09/1998 15:32:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Need help on Grid
Miscellaneous
Thread ID:
00141589
Message ID:
00141589
Views:
67
I have a grid on the form, and i have 5 columns on the grid and i text box for the customer.(product code, product colour, unitprice, qty ,totamt) one customer may has different product with different color and i have the same product with different color and same customer as well therefore i need to search the customer first then list out all the product which is belong to this customer in the combo in the grid.
when i get the customer code then the product combo will list all the product that belong to the customer in the grid. When i choose from the product combo then the product color, it should list out the all the color that belong to this product that i choose.

for the customer i have the code in the valid method.

IF !EMPTY(THIS.VALUE)
TRNLST=SYS(2015)
WITH THISFORM.GRID1.Column1.COMBO1
.COLUMNCOUNT = 2
.ROWSOURCETYPE = 3
.RowSource = "SELECT PRODUCTID,DESCRIPTION FROM PRODUCT Order by PRODUCTID WHERE PRODUCT.CUSTOMERID=THIS.VALUE INTO CURSOR (M.TRNLST)"
.Value = .ROWSOURCE
ENDW

ENDIF

and i have sql statement for the customer in the rowsource.

In the grid, i have the code in the valid method for the product code

PRODI=SYS(2015)
WITH THISFORM.GRID1.Column2.COMBO1
.COLUMNCOUNT = 1
.ROWSOURCETYPE = 3
.RowSource = "SELECT PRODCOLOUR FROM PRODUCT Order by PRODCOLOUR WHERE PRODUCT.PRODUCTID = THIS.VALUE INTO CURSOR (M.PRODI)"
.Value = .ROWSOURCE
ENDW


the problem is it give me the funning thing "SELEC" and sometime it works. and i cant find unit price for that product code and product color.

in the product color' s interactivechange i have the code

stor Thisform.Grid1.COLUMN1.COMBO1.value+Thisform.GRID1.COLUMN2.
COMBO1.value to rkey
select product
set order to 3
seek rkey
if found()
STOR PRICE to THISFORM.GRID1.COLUMN3.TEXT1.VALUE
else
STOR 0.00 to THISFORM.GRID1.COLUMN3.TEXT1.VALUE
endi

Pls help me for this..
Next
Reply
Map
View

Click here to load this message in the networking platform