Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for a specific column i a grid.
Message
From
04/05/2005 08:24:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Miscellaneous
Thread ID:
01010700
Message ID:
01010725
Views:
26
>Hallo all!
>I have a problem with grids that I can't manage.
>I want to check if a specific column exists, but I dont find any way to search through the grid to find out.
>In one case, if the column exist, I want to remove it, and in an other case I want to create it... if it not exist.
>My main problem is to find a specific column by column name or indexnumber or what parameter I schould search for.
>I have tried different solutions, but none of them works correctly. Is there some function I can use, that I not have found in the manual?
>
>I hope anyone could give me some hints to work with.
>Thankyou very much.
>/Kjell

By name should indeed be possible, if you give your columns meaningful names. For example, check if type("ThisForm.GrdGrid.Column1") # "U". However, looping through the Columns collection will allow you to check information that might be more meaningful, for example: Does a column exist, whose .ControlSource contains a specific field?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform