Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error - Record Source of a Browse Object in Grid Builder
Message
De
28/02/2003 19:24:23
Leo Kool
Agis Automatisering BV
Harmelen, Pays-Bas
 
 
À
28/02/2003 07:47:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00759323
Message ID:
00759784
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform