Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pls help, grid controlsource problem!
Message
From
03/01/2000 08:37:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Pls help, grid controlsource problem!
Miscellaneous
Thread ID:
00311623
Message ID:
00311623
Views:
80
pls help, i can't change the current grid display to my setting, what i want to do is manual add column one by one in my setting squence from a table, but now even the column header is display in my order , but the grid display the source in only the order which the table once create. i try many method to change it, but it doesn't work , can anyone hlp me!!!

my code:
DIMENSION GRD_INFO[6,2]
GRD_INFO[1,1] = 'Item No.'
GRD_INFO[1,2] = 'SODETAIL.ITEM_NO'
GRD_INFO[2,1] = 'Item Desc.'
GRD_INFO[2,2] = 'SODETAIL.ITEM_DESC'
GRD_INFO[3,1] = 'Customer'
GRD_INFO[3,2] = 'SODETAIL.CUST_CODE'
GRD_INFO[4,1] = 'ETD'
GRD_INFO[4,2] = 'SODETAIL.ETD'
GRD_INFO[5,1] = 'Qty'
GRD_INFO[5,2] = 'SODETAIL.QTY'
GRD_INFO[6,1] = 'Price'
GRD_INFO[6,2] = 'SODETAIL.UNIT_PRICE'

WITH THISFORM.DET_GRD
.RECORDSOURCE = 'SODETAIL'
.COLUMNCOUNT = 6
FOR I = 1 TO 6
SELECT SODETAIL
.COLUMNS[I].FORECOLOR = RGB(0,0,0)
.COLUMNS[I].REMOVEOBJECT('TEXT1')
.COLUMNS[I].ADDOBJECT('TEXT1','Textbox')
.COLUMNS[I].HEADER1.CAPTION = GRD_INFO[I,1]
.COLUMNS[I].HEADER1.ALIGNMENT = 0
.COLUMNS[I].CONTROLSOURCE = GRD_INFO[I,2]
.COLUMNS[I].CURRENTCONTROL = 'TEXT1'
.COLUMNS[I].SPARSE = .T.
ENDFOR
ENDWITH
Next
Reply
Map
View

Click here to load this message in the networking platform