Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RemoveObject
Message
De
30/03/2001 03:56:08
 
 
À
29/03/2001 12:14:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00489831
Message ID:
00490234
Vues:
11
Thanks for the response Daniel,

I have ended up using your suggestion of the Columns collection which works well(Although I did want to fix the original issue if the columns not dissapearing)

Thanks for your help

Will

>>>>>>>>>>>> My Reply
>To verify whether a column was removed:
>Traverse the Columns collection and verify whether the removed column's name is still in the collection.
>
>For example, to verify if the column named MyColumn was removed from MyGrid,
>
>llRetVal = .T.
>lcName = Lower('MyColumn')
>With Thisform.MyGrid
>   For n = 1 To .ColumnCount
>      If Lower(.Columns(n).Name) == lcName Then
>         *-- False imdicates the column was NOT removed
>         llRetVal = .F.
>         Exit
>      EndIf
>   EndIf
>EndWith
>
>
>I bet you are removing columns from a grid where the grid or one of its parent container is subclassed or instantiated with CreateObject(). If this is the case, Thisform.MyGrid.MyColumn will always be a member of the MyGrid grid although it will contain an invalid reference (not pointing to an existing column) after it is removed. Howeverm the Columns collection is updated as soon as the MyColumn column is removed and should be used to validate the remaining presence of a column.
>
>Daniel
Will Jones
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform