Click here to Skip to main content
15,902,777 members
Home / Discussions / C#
   

C#

 
QuestionFraming JScript Exceptions in C#? Pin
kumar.bs5-Dec-07 10:02
kumar.bs5-Dec-07 10:02 
QuestionDataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking Pin
alanteigne5-Dec-07 10:01
alanteigne5-Dec-07 10:01 
GeneralRe: DataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking Pin
alanteigne6-Dec-07 2:07
alanteigne6-Dec-07 2:07 
AnswerRe: DataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking Pin
alanteigne6-Dec-07 5:24
alanteigne6-Dec-07 5:24 
QuestionHow can I get the call stack of a StackOverflowException? Pin
Dr. Spack5-Dec-07 10:00
Dr. Spack5-Dec-07 10:00 
GeneralRe: How can I save the call stack of a StackOverflowException? Pin
Robert Royall5-Dec-07 10:50
Robert Royall5-Dec-07 10:50 
GeneralRe: How can I save the call stack of a StackOverflowException? Pin
Dr. Spack5-Dec-07 23:30
Dr. Spack5-Dec-07 23:30 
Generalnavigating all nodes in a win forms treeview Pin
radi85-Dec-07 8:38
radi85-Dec-07 8:38 
I am using Treeview in a C# windows form. The data entered into the tree is a hierarchical listing of table definitions associated in groups of various depth off of the Treeview root.

I am looking for a class or routine where I can navigate through each Treeview node and node/child, get the value of the element so i can process the output.

I have a rudimental listing of this through the first 2 nodes (with testing ), but this requires some more elaborate coding, maybe recursive:

<br />
String nodeName = "";<br />
int nodeNum = 0;<br />
int i = 0, j = 1, k=0, cnt=0, lstNode=0;<br />
nodeName = treeView1.ToString();<br />
if (treeView1.Nodes.Count > 0)<br />
{<br />
     for (i = 0; i < treeView1.Nodes.Count; i++)<br />
     {<br />
          nodeName = treeView1.Nodes[i].Text.ToString();<br />
          cnt = treeView1.Nodes[i].GetNodeCount(false);<br />
          if (cnt > 0)<br />
          {<br />
               lstNode = treeView1.Nodes[i].LastNode.Index;<br />
               lstNode = treeView1.Nodes[i].LastNode.Level;<br />
               for (j = 0; j < cnt; j++)<br />
               {<br />
                    try<br />
                    {<br />
                         nodeName = treeView1.Nodes[i].Nodes[j].Text.ToString();<br />
                    }<br />
                    catch (Exception e)<br />
                    { <br />
                         nodeName = "Undefined"; <br />
                    }<br />
               }<br />
          }<br />
     }<br />
}<br />

This needs to be refined so that I can see ALL child elements no matter how deep they are in the Treeview.

Can anyone help?
GeneralRe: navigating all nodes in a win forms treeview Pin
Giorgi Dalakishvili5-Dec-07 8:53
mentorGiorgi Dalakishvili5-Dec-07 8:53 
GeneralRe: navigating all nodes in a win forms treeview Pin
radi85-Dec-07 8:55
radi85-Dec-07 8:55 
GeneralRe: navigating all nodes in a win forms treeview Pin
Pete O'Hanlon5-Dec-07 9:19
mvePete O'Hanlon5-Dec-07 9:19 
GeneralRe: navigating all nodes in a win forms treeview Pin
radi86-Dec-07 6:10
radi86-Dec-07 6:10 
QuestionFind name of declaring property of an object Pin
Joby15-Dec-07 8:37
Joby15-Dec-07 8:37 
GeneralRe: Find name of declaring property of an object Pin
Christian Graus5-Dec-07 9:16
protectorChristian Graus5-Dec-07 9:16 
GeneralRe: Find name of declaring property of an object Pin
Pete O'Hanlon5-Dec-07 9:20
mvePete O'Hanlon5-Dec-07 9:20 
GeneralWanted to built my own ACD (Auto Call Distribution) Pin
Muhammad Nauman Yousuf5-Dec-07 7:16
Muhammad Nauman Yousuf5-Dec-07 7:16 
GeneralIO performance in c# Pin
poqeqw5-Dec-07 7:01
poqeqw5-Dec-07 7:01 
GeneralRe: IO performance in c# Pin
Ennis Ray Lynch, Jr.5-Dec-07 10:01
Ennis Ray Lynch, Jr.5-Dec-07 10:01 
QuestionAre there in-depth samples for WorkFlow Foundation DependencyProperty ? Pin
vgrigor15-Dec-07 5:27
vgrigor15-Dec-07 5:27 
Questionwebbrowser component and web application using java Pin
JackD5-Dec-07 5:15
JackD5-Dec-07 5:15 
Generalconnection error Pin
arkiboys5-Dec-07 4:59
arkiboys5-Dec-07 4:59 
GeneralRe: connection error Pin
Dave Kreskowiak5-Dec-07 5:43
mveDave Kreskowiak5-Dec-07 5:43 
QuestionPassing value types async Pin
Andre Azevedo5-Dec-07 4:15
Andre Azevedo5-Dec-07 4:15 
GeneralRe: Passing value types async Pin
led mike5-Dec-07 5:17
led mike5-Dec-07 5:17 
GeneralRe: Passing value types async [modified] Pin
Andre Azevedo5-Dec-07 6:37
Andre Azevedo5-Dec-07 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.