Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error - Record Source of a Browse Object in Grid Builder
Message
From
28/02/2003 19:24:23
Leo Kool
Agis Automatisering BV
Harmelen, Netherlands
 
 
To
28/02/2003 07:47:16
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00759323
Message ID:
00759784
Views:
17
Hi Don,

I think the columns ar not deleted properly, you can do this the easiest way by issue-ing the following command:
*!* Set to default = -1, which specifies that the Grid control should contain
*!* enough columns to accommodate all the fields in the grid's record source. 
oGrid.ColumnCount = -1
*!* Set correct recordsourcetype
if oGrid.RecordSourceType # 1
	oGrid.RecordSourceType = 1 && alias
endif
*!* get the DE
= aselobj(aAns,2)
oDE = aAns[1]
oGrid.RecordSource = oDE.Cursor1.Alias
*!* change columns to cusColumn
for nCol = 1 to oGrid.ColumnCount
	with oGrid
		cColumn = "Column" + alltrim(str(nCol))
		.RemoveObject(cColumn)
		.AddObject(cColumn, "cusColumn")
	endwith
endfor
HTH,

Leo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform