Solved

Fields to store SelctedNode C#

Posted on 2009-04-12
4
229 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
Comment Utility
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
Comment Utility
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
Comment Utility

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

Open in new window

0
 

Author Closing Comment

by:csharp_learner
Comment Utility
Thanks, exactly what I was looking for.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mutually exclusive checkbox in a gridview 18 40
Pass through dll 2 33
C# Update Status Bar.... 1 22
Calling stored proc in EDMX 11 17
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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

11 Experts available now in Live!

Get 1:1 Help Now