Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
JANARDHAN GURRAM2-Jan-12 21:59
JANARDHAN GURRAM2-Jan-12 21:59 
AnswerRe: how to copy cheked nodes from a treeview to to new treeview? Pin
BillWoodruff2-Jan-12 14:10
professionalBillWoodruff2-Jan-12 14:10 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
JANARDHAN GURRAM2-Jan-12 21:40
JANARDHAN GURRAM2-Jan-12 21:40 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
BillWoodruff2-Jan-12 23:04
professionalBillWoodruff2-Jan-12 23:04 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
JANARDHAN GURRAM2-Jan-12 23:49
JANARDHAN GURRAM2-Jan-12 23:49 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview?<SOLVED> Pin
JANARDHAN GURRAM3-Jan-12 1:06
JANARDHAN GURRAM3-Jan-12 1:06 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
BillWoodruff3-Jan-12 2:51
professionalBillWoodruff3-Jan-12 2:51 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
JANARDHAN GURRAM5-Jan-12 18:17
JANARDHAN GURRAM5-Jan-12 18:17 
Bill your solution is obsolutely correct and it worked for me..but if there are 50 k nodes like in my case for every little change parsing whole treenodecollection is time taking . so what i did i have sent only checked nodes to the recursiveparsetree and there i have added them to string array and deleted from it when modified and used it for 2nd treeview(actually i need to display in table..wat ever it may be).

 private void Load_treeView_AfterCheck(object sender, TreeViewEventArgs e)
        {
               RecursiveParseTree(e.Node, 0);              
         }
 private void RecursiveParseTree(TreeNode thenode, int level)
        {
            // for adding the checked nodes and its child nodes(if they are checked) from the _dataArray list
                if(thenode.Checked==true)
                {
                foreach(TreeNode childNode in thenode.Nodes)
                    if (childNode.Checked == true)
                   {
                       _dataArray.Add(new string[] { thenode.Text, childNode.Text });
                    }
                }

            // for deleting the unchecked nodes and its child nodes from the _dataArray list
                if (thenode.Checked == false)
                {
                    foreach (TreeNode childNode in thenode.Nodes)
                    {
                        List<string> Key = new List<string> { thenode.Text, childNode.Text };
                        _dataArray.RemoveAll(item => Enumerable.SequenceEqual(item, Key));
                    }

                }

       }
<div class="signature">JANARDHAN</div>

GeneralRe: how to copy cheked nodes from a treeview to to new treeview? Pin
BillWoodruff5-Jan-12 22:38
professionalBillWoodruff5-Jan-12 22:38 
GeneralRe: how to copy cheked nodes from a treeview to to new treeview?<SOLVED> Pin
JANARDHAN GURRAM3-Jan-12 1:14
JANARDHAN GURRAM3-Jan-12 1:14 
QuestionProblem with Snake game in C# Pin
ori26942-Jan-12 3:20
ori26942-Jan-12 3:20 
AnswerRe: Problem with Snake game in C# Pin
Luc Pattyn2-Jan-12 3:42
sitebuilderLuc Pattyn2-Jan-12 3:42 
GeneralRe: Problem with Snake game in C# Pin
ori26942-Jan-12 4:31
ori26942-Jan-12 4:31 
Questionhow to preserve zero bebore number in csv file that opens on excell ? Pin
goldsoft2-Jan-12 0:23
goldsoft2-Jan-12 0:23 
AnswerRe: how to preserve zero bebore number in csv file that opens on excell ? Pin
Shameel2-Jan-12 2:18
professionalShameel2-Jan-12 2:18 
AnswerRe: how to preserve zero bebore number in csv file that opens on excell ? Pin
Richard MacCutchan2-Jan-12 3:35
mveRichard MacCutchan2-Jan-12 3:35 
GeneralRe: how to preserve zero bebore number in csv file that opens on excell ? Pin
Shameel2-Jan-12 3:44
professionalShameel2-Jan-12 3:44 
GeneralRe: how to preserve zero bebore number in csv file that opens on excell ? Pin
Richard MacCutchan2-Jan-12 3:57
mveRichard MacCutchan2-Jan-12 3:57 
QuestionHow to Convert Microsoft Office Word document to Image file such as Tiff? Pin
moslemB1-Jan-12 23:44
moslemB1-Jan-12 23:44 
QuestionRe: How to Convert Microsoft Office Word document to Image file such as Tiff? Pin
DaveAuld1-Jan-12 23:57
professionalDaveAuld1-Jan-12 23:57 
Questionmove from cells in dataGridview Pin
Nabawoka1-Jan-12 10:50
Nabawoka1-Jan-12 10:50 
AnswerRe: move from cells in dataGridview Pin
DaveAuld2-Jan-12 0:03
professionalDaveAuld2-Jan-12 0:03 
QuestionWebservice returns dataset as an xml Pin
kondapalli.santosh1-Jan-12 8:43
kondapalli.santosh1-Jan-12 8:43 
QuestionRe: Webservice returns dataset as an xml Pin
David C# Hobbyist.1-Jan-12 9:07
professionalDavid C# Hobbyist.1-Jan-12 9:07 
AnswerRe: Webservice returns dataset as an xml Pin
kondapalli.santosh1-Jan-12 10:25
kondapalli.santosh1-Jan-12 10:25 

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.