Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing grid with no alias
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01430324
Message ID:
01430359
Views:
38
Thanks Sergey

Looking at it again, it seems the source is set up CUSTOMERS

So what you're saying is I need to loop through CUSTOMERS and going through the columns in the grid for each record.

Rob




>Grid cannot work w/o a table or cursor. You can get its alias from grids RecordSource property.
>
>You can loop through the grids Columns collection and check the value for each column
>
>
>
>WITH Thisform.Grid1
>  FOR =1 TO .ColumnCount
>    IF lcSearchValue $ EVAL(.Columns(i).ControlSource)
>...
>
>>
>>I've been using an inherited form class that allows me to quickly & easily pass it a few parameters and it constructs an easy to use grid, and of course I've been happily using it for years.
>>
>>Been asked to add a Text Search option at the bottom of the grid, no problem I thought.
>>
>>When I dug around inside this class, to my amazement I found the grid it creates has no alias, the control source of some of the columns can be several fields eg Customers.csurname+" "+customers.cfirstname
>>
>>So i've no table to search through, the grid has no alias, and the grid is not using an array.
>>
>>How the hell do I go through the grid, looking for my search string text, in particular I want to be able to search for say
>>
>>CLAPWORTHY ROBIN
>>
>>in the grid example, this a combination of the two fields above IE CUSTOMERS.SURNAME+" "+CUSTOMERS.FIRSTNAME
>>
>>Can anyone help?
>>
>>TIA
>>
>>Rob
Rob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform