Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting grid with Linkmaster
Message
From
16/05/2002 11:12:11
 
 
To
15/05/2002 13:14:38
Richard Recore
Debt Management Associates
Boca Raton, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00657021
Message ID:
00657496
Views:
27
Hi!

Assume you have ID field named "Parent_ID" and character field called "cName". Using "SET KEY TO RANGE ..." command you can do folowing:

- create indexes in table for sorting like "padl(Parent_ID,12,'0') + padr(cName,100)"
- when master record changes, instead of Link Master use "SET KEY TO RANGE padl(m.nParent_ID,12,'0') + space(100), padl(m.nParent_ID+1,12,'0') + replicate(chr(0),100)"

While index covers both ID and cName, you will limit displaying of child record to only thous that belong to current master record using the range for keys.

Hope this helps.

>Have a grid located on a form which as it's datasource has child records. The original devloper used the dreaded LinkMaster property to bind the FK in the child to the PK in the parent. We need to sort the grid by a column other than the FK value. Setting ChildOrder in the grid properties sheet does nothing, and manually re-ordering the grid loses the relationship between child/parent. We have tried unbinding the grid and manually populating by a parameterized view and by cursor, and the speed difference is tremendous. How do you re-sort a grid which is bound, using the Linkmaster property? Child table has 7,000,000 records.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform