General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Pls help, grid controlsource problem!
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only