Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error - Record Source of a Browse Object in Grid Builder
Message
De
03/03/2003 08:05:38
 
 
À
28/02/2003 19:24:23
Leo Kool
Agis Automatisering BV
Harmelen, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00759323
Message ID:
00760306
Vues:
18
This does not seem to do it. After looping thru and doing the .DeleteColumns the .ColumnCount is left at 0. Setting it to -1 does not seem to help

Thanks

>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
Best Regards
Don Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform