473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

TreeView1.SelectedNode.Remove-missing Tag

Dear friends

I remove the selected node in a treeview like this:

TreeView1.SelectedNode.Remove

When this is done I see something odd has happened. That is the tag and text
properties of the last node in the folder has disappeared. Do somebody know
why and how to prevent this?

Regards Able
Nov 20 '05 #1
4 2899
* "Able" <ab**@epost.no> scripsit:
I remove the selected node in a treeview like this:

TreeView1.SelectedNode.Remove

When this is done I see something odd has happened. That is the tag and text
properties of the last node in the folder has disappeared. Do somebody know
why and how to prevent this?


I am not able to repro that on a Windows XP Professional + .NET 1.1
system.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Hi,

TreeView1.Nodes.Remove(TreeView1.SelectedNode)

Ken
-------------------
"Able" <ab**@epost.no> wrote in message
news:5D******************@news4.e.nsc.no...
Dear friends

I remove the selected node in a treeview like this:

TreeView1.SelectedNode.Remove

When this is done I see something odd has happened. That is the tag and
text
properties of the last node in the folder has disappeared. Do somebody
know
why and how to prevent this?

Regards Able

Nov 20 '05 #3
Sorry, bad research.

Able

"Able" <ab**@epost.no> skrev i melding
news:5D******************@news4.e.nsc.no...
Dear friends

I remove the selected node in a treeview like this:

TreeView1.SelectedNode.Remove

When this is done I see something odd has happened. That is the tag and text properties of the last node in the folder has disappeared. Do somebody know why and how to prevent this?

Regards Able

Nov 20 '05 #4
* "Ken Tucker [MVP]" <vb***@bellsouth.net> scripsit:
TreeView1.Nodes.Remove(TreeView1.SelectedNode)


I still don't understand what's wrong with the OP's code...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: .pd. | last post by:
Hello - is it possible to create a treeview and have a second treeview point to a subtree of the first treeview? E.g. treeview1 = level0 level1a level2a level3a
4
by: David Elliott | last post by:
Hi, I have a Windows Explorer-like treeview that displays directories. After a cut/paste operation, I want the treeview to display the folder where the paste happened. But, I'm running into a...
3
by: Polo | last post by:
Hi, How can I set the SelectedNode (by code) visible in the tree (the first visible node in the control) ? thank's
1
by: jyoti ranjan | last post by:
i have a ie webcontrols treeview in my application. by default treeview is selecting the first node as selected index. i don't want a default selectednode. how can i get that one . can any body pls...
0
by: Bobby Owens | last post by:
Hi, I'm current having a problem with the treeview control and multi threading. The treeview is on a form. A request is then sent to a server using IP for the data. The data arrives in an event...
0
by: Jared | last post by:
I am using a TreeView with data stored in a database and have been trying to store a node index over a postback and re-select the node without using javascript. I couldn't find anything in these...
1
by: Dean Hinson | last post by:
Hello, I am trying to spawn a sunroutine in a worker thread for populating a trreeview. I set the selectednode and then start the thread. However, the thread errors because the selectednode was...
8
by: Jerry | last post by:
Hello, I am able to GET the selected node with my code. I would however like to SET any node with code. Something like me.treeview.selectednode="First" But this doesn't work. I can't find...
0
by: stacy | last post by:
My asp.net Web application is written in VB, using VS 2005 with Framework 2.0 I am having trouble with the SelectedNode element. The TreeView is built programmatically and looks like this: -...
0
by: bsturg21 | last post by:
Hello, I have an app that has a custom treeview which inherits the base treeview class and I am having a problem with the way the treeview is being redrawn. Each node in the treeview represents a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.