Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent-child refreshing problem
Message
From
29/09/1998 12:10:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/09/1998 11:55:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00141038
Message ID:
00141976
Views:
27
Seems it's not really ordering but is implicitly. That's why I warned you do not change order on the fly for child.
use parenttable in 0
use childtable in 0 order tag reltag
select parenttable
set relation to parkeyfield into childtable
select childtable
set order to anothertag
Would present a wrong relation and child would be empty (or by chance would be filled with parent-anothertag matching recs). So it's not strange. Have the correct relation, still sort on another field, you could use compound indexes :
* Child - assume parentlink is char custid
index on custId+dtos(dOrderDate) tag reltag
Would provide correct link + a sort on dorderdate field.
Cetin


>Thanks a lot everyone for your many advises.
>It`s finally working, well, in a certain way.
>
>Barbara,
>in other words, in the child grid properties we must set RelationalExpr and ChildOrder to the same key!
>In my case, I wanted to sort the child grid on a different tag and that gave me a blank grid.
>Humm, isn`t that strange? Using that tag for ChildOrder is not realy ordering the child table since the value of that field is the same for selected records!?
>(tell me if there`s something i miss)
>
>Cetin,
>your code bellow shows what I wanted to do. But I had to set ChildOrder = "parkeyfield" otherwise the child grid was blank. (i`ll verify my INDEX and TAGs again though)
>
>Claude
>
>
>>Now in your relation as Barbara stated, childorder seem to be wrongly set. :
use parenttable in 0
>>use childtable in 0 order tag reltag
>>select parenttable
>>set relation to parkeyfield into childtable
>>
>>* Correspond to properties of child grid
>>Childorder = "reltag"
>>Linkmaster = "parenttable"
>>RelationalExpression = "parkeyfield"
Ç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
Reply
Map
View

Click here to load this message in the networking platform