Solved

Fields to store SelctedNode C#

Posted on 2009-04-12
4
233 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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