Re: Deleting a node from TreeView
From: Leif (Leif_at_discussions.microsoft.com)
Date: 02/13/05
- Next message: Ken Snell [MVP]: "Re: docmd.execute "update..." problem"
- Previous message: Angi: "docmd.execute "update..." problem"
- In reply to: Rob Parker: "Re: Deleting a node from TreeView"
- Next in thread: Rob Parker: "Re: Deleting a node from TreeView"
- Reply: Rob Parker: "Re: Deleting a node from TreeView"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 12 Feb 2005 19:49:03 -0800
Rob,
Thanks for your reply. I was afraid of that. I probably could use an array
to store the states, but I'm not sure its worth the effort. I see what the
client thinks.
On your problem, I goggled it and came up with the following. Hope it helps.
Receive an Error Like "The object invoked has disconnected from its clients"
and Must Re-Start the Application in Order to Perform Certain Activities
Issue:
A rare/intermittent issue has been observed when using ReliaSoft's software
products on Windows 2000 and some Windows NT systems with 2000 libraries. An
error like "The object invoked has disconnected from its clients" appears and
the user is unable to perform functions associated with the object
disconnect. The problem is resolved by re-starting the application.
Solution:
This problem is due to an issue with Windows 2000, not ReliaSoft software,
as confirmed by Microsoft. Microsoft's support document number Q293631
describes the issue. Microsoft has made a hot fix available and has announced
plans to address this issue with a service pack.
"Rob Parker" wrote:
> AFAIK, there is no delete method for nodes in a treeview control. Your
> approach - repopulate the tree - is the only way to do it.
>
> What you can do, though, is to set the expanded property of each node as you
> add it. This allows you to open the tree in any state you want it. If you
> want/need to open it in its previous state (an unknown mix of true/false
> values for each node's expanded property), you'll need to add a field to the
> table that the tree is based on, store the appropriate value in it when you
> are processing node clicks, and use that in the recordset when you
> re-populate the treee to restore its previous state.
>
> HTH,
>
> Rob
>
> BTW, if you can tell me why I keep getting Run-Time Error -2147417848
> "Automation error. The object invoked has disconnected from its clients@@"
> in a treeview control I'd be eternally grateful! I've used treeview
> controls in a couple of databases with no problems, but in another one I get
> this error with monotonous regularity - and it usually crashes the whole
> application!
>
>
> "Leif" <Leif@discussions.microsoft.com> wrote in message
> news:A1CAC8C7-ACF3-4F5D-AB2E-9B7982B124DD@microsoft.com...
> > I would like to delete a node from treeview. I can add, I can rename, but
> I
> > don't see a delete method. The work around I've tried is to delete the
> > record from the table, clear treeview, then repopulate the tree. However,
> > after doing that my tree is collapsed. Is there a better way to do a
> delete?
> >
> > Thanks,
> > Leif
>
>
>
- Next message: Ken Snell [MVP]: "Re: docmd.execute "update..." problem"
- Previous message: Angi: "docmd.execute "update..." problem"
- In reply to: Rob Parker: "Re: Deleting a node from TreeView"
- Next in thread: Rob Parker: "Re: Deleting a node from TreeView"
- Reply: Rob Parker: "Re: Deleting a node from TreeView"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|