Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pick List Control Source
Message
From
31/12/1997 11:23:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/12/1997 11:04:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00068514
Message ID:
00068632
Views:
26
>>>Hi All:
>>>
>>>I'm creating a PickList Class. It will use a grid somewhat along the lines of inGrid (if you don't
>>>know about that, doesn't matter).
>>>
>>>My first use involves selecting a record from the child record of a one to many relationship.
>>>Specifically, I have a Client.dbf and an Address.dbf. A Client can have more than one address (a lot of snow
>>>birds who spend 6 months in the north, 3 months in Arizona and 3 months travelling with a mail forwarding
>>>address).
>>>I want the pick list to have the first and last name along with the zip code, state, address, etc as separate
>>>columns with indexes on each one, so that the use can select whatever index they want and incrementally search
>>>the source.
>>>
>>>My problem.
>>>
>>>What should I use as the source for the grid?
>>>How can I get all the different indexes available?
>>>If I use a view that combines the 2 tables together, then I have to do a REQUERY() each time I want to change
>>>the index (by a click at the top of the column), and that could get real slow when I have a lot of addresses.
>>>If I use the DBFs set up in a relationship, how do I get the index to change from the parent table (set
>>>relation to child) to the child table (set relation to parent), at a click().
>>>
>>>The only thing I can think of that solves most of my problems, is to duplicate the fields from the parent table
>>>in the child table, so that all the indexes I want are in a single table. That creates a maintenance headache
>>>because I can't make the last name a candidate index, so I can't use RI to automatically update the child table.
>>>
>>>Any ideas?
>>
>>Bill, I think you need to create a parameterized view as RecordSource for the grid. Then you can index the view on selected column.
>>You can try to use some textbox search classes from UT Files section for your grid.
>>Do you use any framework for your app? For example, Visual Fox Extend has all functionality you need built in their PowerGrid class.
>>
>>Nick
>
>Hi Nick
>
>How do I index the view? The only thing I see is the order by during a requery(). I don't like that idea,
>because it forces a requery() each time a different column is selected, and that can take too long if there
>are MANY records to requery().
>
>I'm using the AppWiz framework. I've tried the StoneField, CodeBook, and MaxFrame frameworks. I always spend
>too much time trying to figure out how to modify it to suit me, I figure this time, that it'll just be quicker
>to build my own from the AppWiz.
>
>Bill
Hi Bill,
Use view myview
for ix=1 to fcount()
   cField = field(i)
   index on &cField tag (field(ix))
endfor
Than set your inGrid cSearchTag(s) accordingly.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform