473,406 Members | 2,698 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,406 software developers and data experts.

vb.net treeview prevnode problems

Hi,
I'm having difficulty with the treeview control in vb.net.

The following is my code:

Dim somenode As TreeNode
somenode = treeCheck.SelectedNode
treeCheck.SelectedNode = somenode.prevnode

Basically i just want the node before the selected node to be selected but
for some reason VB.net isn't recognizing Prevnode as a property in the
TreeNode Class. Even though the docs say it is.
"PrevNode - TreeNode - Read-only. The previous sibling node in the parent
node's Nodes collection. If there is no previous node, returns
null/Nothing."

somenode is a TreeNode so it should have PrevNode, but it doesn't. Anyone
have any ideas?

Thank you,
Felix
Nov 20 '05 #1
4 2047
"Felix" <fe***@risny.com> schrieb
Hi,
I'm having difficulty with the treeview control in vb.net.

The following is my code:

Dim somenode As TreeNode
somenode = treeCheck.SelectedNode
treeCheck.SelectedNode = somenode.prevnode

Basically i just want the node before the selected node to be
selected but for some reason VB.net isn't recognizing Prevnode as a
property in the TreeNode Class. Even though the docs say it is.
"PrevNode - TreeNode - Read-only. The previous sibling node in the
parent node's Nodes collection. If there is no previous node,
returns null/Nothing."

somenode is a TreeNode so it should have PrevNode, but it doesn't.
Anyone have any ideas?


This code compiles fine here. VB.Net 2003, Framework 1.1.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
I also have Vb.net 2003 1.1 Framework.

I've tried just having this code fragement alone in a Visual Studio Project
of its own and it still says: prevnode is not a member of
System.Windows.Forms.TreeNode.

Anyone have any clue what i'm doing wrong?
Thanks,
Felix

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Felix" <fe***@risny.com> schrieb
Hi,
I'm having difficulty with the treeview control in vb.net.

The following is my code:

Dim somenode As TreeNode
somenode = treeCheck.SelectedNode
treeCheck.SelectedNode = somenode.prevnode

Basically i just want the node before the selected node to be
selected but for some reason VB.net isn't recognizing Prevnode as a
property in the TreeNode Class. Even though the docs say it is.
"PrevNode - TreeNode - Read-only. The previous sibling node in the
parent node's Nodes collection. If there is no previous node,
returns null/Nothing."

somenode is a TreeNode so it should have PrevNode, but it doesn't.
Anyone have any ideas?


This code compiles fine here. VB.Net 2003, Framework 1.1.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
I forgot to mention i'm coding with the .net compact framework.

I guess the .net CF doesn't have those properties for a treenode :-(

Felix

"Felix" <fe***@risny.com> wrote in message
news:b6**************************@posting.google.c om...
Hi,
I'm having difficulty with the treeview control in vb.net.

The following is my code:

Dim somenode As TreeNode
somenode = treeCheck.SelectedNode
treeCheck.SelectedNode = somenode.prevnode

Basically i just want the node before the selected node to be selected but
for some reason VB.net isn't recognizing Prevnode as a property in the
TreeNode Class. Even though the docs say it is.
"PrevNode - TreeNode - Read-only. The previous sibling node in the parent
node's Nodes collection. If there is no previous node, returns
null/Nothing."

somenode is a TreeNode so it should have PrevNode, but it doesn't. Anyone
have any ideas?

Thank you,
Felix

Nov 20 '05 #4
Yea i just checked MSDN and prevnode and many others aren't supported in the
..net CF!

Now i need to completly rethink the entire design of my code. Perfect.

Thanks for the help.
Felix

"Felix" <fe***@risny.com> wrote in message
news:wA*****************@bgtnsc04-news.ops.worldnet.att.net...
I forgot to mention i'm coding with the .net compact framework.

I guess the .net CF doesn't have those properties for a treenode :-(

Felix

"Felix" <fe***@risny.com> wrote in message
news:b6**************************@posting.google.c om...
Hi,
I'm having difficulty with the treeview control in vb.net.

The following is my code:

Dim somenode As TreeNode
somenode = treeCheck.SelectedNode
treeCheck.SelectedNode = somenode.prevnode

Basically i just want the node before the selected node to be selected but for some reason VB.net isn't recognizing Prevnode as a property in the
TreeNode Class. Even though the docs say it is.
"PrevNode - TreeNode - Read-only. The previous sibling node in the parent node's Nodes collection. If there is no previous node, returns
null/Nothing."

somenode is a TreeNode so it should have PrevNode, but it doesn't. Anyone have any ideas?

Thank you,
Felix


Nov 20 '05 #5

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

Similar topics

10
by: WJA | last post by:
I'm looking at building an application that needs to display 4 levels of hierarchical data. Initially the obvious choice for this would seem to be the treeview control. After searching this...
4
by: Ian Powell | last post by:
Hi I've got objects in an sorted ArrayList like: P:\ P:\\DOCS P:\\i386 P:\\i386\ASMS P:\\i386\ASMS\1000 P:\\i386\ASMS\1000\MSFT
1
by: Raed Sawalha | last post by:
I have a TreeView with 4 levels I need to implement Next and Back capability , my problem in how to traverse the tree to achieve this task.
0
by: Treeview Trouble | last post by:
I have an application where there are two radio buttons each of which populates a treeview control with a directory structure. Each radio button corresponds to a different directory which may or...
1
by: Alex D. | last post by:
hey guys I found what is causing the problems with my treeview in Firefox...the answer is: treeview+dropdwonlist in the same page dont work! try this simple code and see for yourselves. you can do...
2
by: Kristopher Wragg | last post by:
I'm having some serious problems with the TreeView control. I've got a control that inherits TreeView and has some methods that firstly create a TreeNode then does some recursive procedure to add...
1
by: echuck66 | last post by:
Hi, I have a Winforms 2.0 project that I'm working on that involves populating a treeview control from data contained in a fairly large dataset that has to be refreshed periodically. I have no...
1
by: Nikron | last post by:
Hi, I'm having an issue with the ASP.NET 2.0 Treeview control and persisting its' state accross requests. My Control is embedded within a master page and is used for site navigation. My problem...
0
by: dutsnekcirf | last post by:
Okay, I think this one is a really hard one for yous geniuses out there. I'm going to try my best to explain in as much detail as I can. And for the most part I just want to know if I'm doing this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.