Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS Treeview
Message
From
06/05/2003 09:15:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/2003 09:09:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00784606
Message ID:
00785315
Views:
33
Peter,
Does it mean the code didn't help ? It generates fixed length key. Anyway I had code somewhere doing the thing you describe. If I can find it I'll post. Check UT magazine June 2001 issue in the meantime (not sure if that helps).
Cetin

>Cetin,
>
>The relationship is that of parent-child.
>Imagine you have a desk which consists of a top,a back, 2 sides,and four legs and 2 pedestal (the boxes the drawers are in) and 2 grommet kits
>
>The pedestal contains 2 sides, a top, a bottom and 8 #12 flathead screws, and 2 file drawers and 2 grommet kits.
>
>The file drawer contains a front, 2 sides, a back and a bottom and let's say 4 #12 flathead screws
>
>
>Here is the bill of meterials for this hypotethical desk:
>desk
>--top 1
>--back 1
>--sides 2
>--legs 4
>--pedestal 2
>----sides 2
>----top 1
>----bottom 1
>----flathead screws 8
>----grommet kits 2
>------grommet
>------grommet cover
>----file drawers 2
>------front 1
>------sides 2
>------back 1
>------bottom 1
>------flathead screws 4
>--grommet kits 2
>------grommet
>------grommet cover
>
>
>
>As soon as you get to the bolded grommet whose parent is the grommet kit the treview chokes, it does not know which parent to look at (not unique key) so i have:
> pedestal-grommet kit
> desk-grommet kit
>
>But I am afraid if i have a very deep BOM I could extend the keylength of the treeview.
>
>
>I guess what I can do is use unique keys for all parts and create a lookup cursor to translate the temporary keys into the real keys
>
>Or concatenate the keys
>
>
>I hope that clearifies the problem
>
>
>Peter
>
>
>
>>Not sure I understood the relation there but trying anyway :
>>
>>Select Padl(Recno(),10,'0')+'_' As NodeID,* ;
>>  from ccBOM ;
>>  order By lev ;
>>  into Cursor crsTree ;
>>  nofilter
>>Index On cid Tag cid
>>Use Dbf('crsTree') In 0 Again Alias crsTree1
>>Select crsTree1
>>Set Relation To pid Into crsTree
>>
>>Scan
>>  If lev=1
>>    loNode=thisForm.oletreeView.Nodes.Add(;
>>      ,1,Trim(NodeID),txt)
>>  Else
>>    loNode=thisForm.oletreeView.Nodes.Add(;
>>      Trim(crsTree.NodeID),4,Trim(NodeID) ,txt)
>>  Endif
>>  loNode.expanded=.T.
>>Endscan
>>
>>Cetin
Ç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