Another question based on update data table sql, i have a grid1 based on combobox vfp and textbox. Actually i taken this script or code from Mr. Cetin with his permission.., like below.
If i use columncount = -1 by code and columncount = -1 by property columncount grid (grdViewer) show me name column or fieldname.
where textbox value 10 is how many column on table
if i use columncount = -1 by code and columncount = 10 by property columncount grid (grdViewer) not show me name column or fieldname.
Now i want to dealing with textbox, I if click on column grdViewer my textbox will show its value (textbox controlsource from grdViewer column) eg. thisform.text2.controlsource = app_direk.handset_id or thisform.text2.value = this.value (on column1.text1 grdViewer)
And on my combobox are listed table name with many column name or field name more than 10 columncount like picture below its tablename has 29 fieldname or columnname
I need advise and sugesstion to dealing with it.
Code:
Local lcSQL
Use In (Select('crsResult'))
TEXT TO m.lcSQL TEXTMERGE noshow
select top(1000) * from << TRIM(crsTables.TableName) >>
ENDTEXT
SQLExec(Thisform.nHandle, m.lcSQL ,'crsResult')
With Thisform.grdViewer
FOR gnCount = 1 TO FCOUNT( ) && Loop for number of fields
thisform.text3.value = ALLTRIM(STR(gnCount))
NEXT
.ColumnCount = -1
.RecordSource = "crsResult"
.AutoFit()
Endwith
If i use columncount = -1 by code and columncount = -1 by property columncount grid (grdViewer) show me name column or fieldname.
where textbox value 10 is how many column on table
if i use columncount = -1 by code and columncount = 10 by property columncount grid (grdViewer) not show me name column or fieldname.
Now i want to dealing with textbox, I if click on column grdViewer my textbox will show its value (textbox controlsource from grdViewer column) eg. thisform.text2.controlsource = app_direk.handset_id or thisform.text2.value = this.value (on column1.text1 grdViewer)
And on my combobox are listed table name with many column name or field name more than 10 columncount like picture below its tablename has 29 fieldname or columnname
I need advise and sugesstion to dealing with it.