Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whattagrid!!!
Message
 
To
05/10/2006 09:11:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01159650
Message ID:
01159665
Views:
20
>>>>Hello Gurus!!
>>>>
>>>>Today's question...................
>>>>
>>>>I have a form with a GRID on it. This grid is displaying data from 3 tables (Rx, Drug and Doctor) that are linked together this way.....
>>>>
>>>>Rx -> Drug through Rx.drug_id = Drug.drug_id
>>>>
>>>>and
>>>>
>>>>Rx -> Doctor through Rx.doctor_id = Doctor.doctor_id
>>>>
>>>>simple enough, yes?
>>>>
>>>>We have a button on the screen for CHANGE GRID ORDER. If pressed, the order of the grid changes.... based on the index chosen when you click the button.
>>>>
>>>>Presently there are only 2 indexes to switch among....
>>>>1) Date order
>>>>2) Descendig Rx number order.
>>>>
>>>>These indices are based on fields that are exclusively in the Rx table, which is the SELECTED table of the grid (the other 2 are linked and some fields displayed).
>>>>
>>>>NOW... we would like to be able to add a 3rd choice to the ordering displayed (and add a 3rd index to choose from). Here is the rub.....
>>>>
>>>>The 3rd index is on DRUG name... which is in the linked table DRUG. I can't create an index based on 2 tables to get at the Drug name..... so what options are available?
>>>>
>>>>Remove the 3 tables from the grid, and replace with a CURSOR of the 3 tables, so as to get at the field DRUG_NAME in DRUG? Or what?
>>>>
>>>>Thanks in advance!!!
>>>>Tommy
>>>
>>>Tommy,
>>>A little confused but I think you mean they're related tables or simply used (linkmaster,childorder.. properties) in grid. That limits you on ordering of child tables.
>>>
>>
>>You are correct.
>>
>>>Instead you could make your recordsource an SQL (it's readonly, right?) and index your columns as you wish.
>>>
>>
>>Well, it turns out there is a lot of dynamic things being done to the Rx table from this grid... (like Voiding the Rx, Refilling the Rx, etc.). So it would have to be a Writable Cursor, or a cursorAdapter.... yike!!!)
>>
>>Thanks for the help!
>>
>>>PS: Check FoxyClasses samples application.
>>>Cetin
>>
>>I will.
>
>
>"So it would have to be a Writable Cursor". You coud have a writable cursor but not needed. You could instead move pointer(s) in base tables as you move in grid (that's the technique FoxyClasses Grids.LocatorGrid class uses).

Thanks for the info!

>Cetin
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform