Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting a different node when returning to treeview fo
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01016206
Message ID:
01016224
Views:
12
>I have a treeview form where the user can drill down to find a particular record to update. When they select a node, a data entry form is displayed for the user to update. The user can also go while on the data entry screen. When the user closes the data entry form and returns to the treeview form, how do i programmatically reposition/highlight the newly selected record, not the record they previously selected.

When the user uses < next > and < prev >, is he moving in a table? How do you relate a node with a record?

What I usually do is having a cursor (which I create while building the tree) with extra information and also synch info, for example if is the above case, I would have two fiels, NodeKey and RecordID, both having indexes, this way I can synch either way. In your case, if you moved the table then a simple:

indexseek(MyMainTable.ID, .t., 'MyCursor', 'RecordID')
MyTree.SelectedItem = MyTree.Nodes(MyCursor.NodeKey)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform