Solved

Fields to store SelctedNode C#

Posted on 2009-04-12
4
230 Views
Last Modified: 2012-05-06
Hi,
Currently I have SelctedNode.Name and SelctedNode.Tag to store 2 fields I want to use later on.
But now i have a 3rd text field I want to store it.
Is there another function in SelctedNode. I can use or I can use the SelctedNode.Name again in another way?
0
Comment
Question by:csharp_learner
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 300 total points
ID: 24128233
u can use the .Tag property to store it as an array like

node.Tag = new object[]{valuetostore1,valuetostore2,valuetostore3};

Open in new window

0
 

Author Comment

by:csharp_learner
ID: 24128316
Thanks for the prompt reply.
So how can i access to the individual tag?
Cos when i tried to access to the individual array it prompts an error.
"treeview.SelectedNode.Tag[0].ToString();"
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 24128350

((object[])treeview.SelectedNode.Tag)[0].ToString();

Open in new window

0
 

Author Closing Comment

by:csharp_learner
ID: 31569421
Thanks, exactly what I was looking for.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Handle null when using linq in this line 1 26
Allow space in this pattern 2 46
Need to pass stored proc parameters in list 13 32
Angular - break the dataset in chunks? 7 38
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now