Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for a specific column i a grid.
Message
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:
01010702
Views:
19
This message has been marked as the solution to the initial question of the thread.
Kjell

Look at :

.Grid.ColumnCount
.Grid.Columns() array

e.g.
lcColSearch = "colCustomers"
For I = 1 to .grid.columncount
  If .grid.Columns( I).Name = lcColSearch 
      Wait window "Found column " + .grid.Columns( I).Name 
  Endif
EndFor
Does this help?

Terry

>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
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform