Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exporting DataGrid to Excel Pin
Sandeep Akhare8-Feb-07 3:44
Sandeep Akhare8-Feb-07 3:44 
GeneralRe: Exporting DataGrid to Excel [modified] Pin
pssuresh8-Feb-07 3:56
pssuresh8-Feb-07 3:56 
QuestionBtrieve Database Pin
coolestCoder8-Feb-07 2:35
coolestCoder8-Feb-07 2:35 
QuestionCast to a Generic Type at runtime Pin
Florian Storck8-Feb-07 2:30
Florian Storck8-Feb-07 2:30 
QuestionDelegate Help Pin
JeremyLM8-Feb-07 2:29
JeremyLM8-Feb-07 2:29 
AnswerRe: Delegate Help Pin
aSarafian8-Feb-07 3:23
aSarafian8-Feb-07 3:23 
GeneralRe: Delegate Help Pin
JeremyLM8-Feb-07 4:04
JeremyLM8-Feb-07 4:04 
QuestionUpdating and removing nodes from a treeview Pin
sharpiesharpie8-Feb-07 2:12
sharpiesharpie8-Feb-07 2:12 
I made a new thread cause i managed to solve my problem and thereby create a new one: I have a treeview with process names, there aren't any child nodes, the nodes' names are the process ID and i add them like so:

for (int i = 0; i < a.Length; i++)
{
        treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
}


Now, i have a timer that adds \ removes processes so i need to check the list if the process exists, and i managed to get the search thing working but i can't seem to remove them, here's the code:

a = Process.GetProcesses();

            for (int i = 0; i < a.Length; i++)
            {
                bool found = false;
                if (treeView1.Nodes.Find(a[i].Id.ToString(), true).Length == 0)
                    treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
                for (int m = 0; m < treeView1.Nodes.Count;m++ )
                {
                    if (a[i].Id.ToString() == treeView1.Nodes[m].Name)
                        found = true;
                }
                if (found == false)
                    treeView1.Nodes.Remove(treeView1.Nodes[a[i].Id.ToString()]);
            }


How can i fix it, or is it a more efficient way of doing it?
AnswerRe: Updating and removing nodes from a treeview Pin
Ravi Bhavnani8-Feb-07 6:16
professionalRavi Bhavnani8-Feb-07 6:16 
QuestionAdding compiled help to a C# project Pin
Antony M Kancidrowski8-Feb-07 1:58
Antony M Kancidrowski8-Feb-07 1:58 
AnswerRe: Adding compiled help to a C# project Pin
Sandeep Akhare8-Feb-07 3:14
Sandeep Akhare8-Feb-07 3:14 
GeneralRe: Adding compiled help to a C# project Pin
Antony M Kancidrowski8-Feb-07 4:24
Antony M Kancidrowski8-Feb-07 4:24 
Questionstring process Pin
Mohammad Daba'an8-Feb-07 1:56
Mohammad Daba'an8-Feb-07 1:56 
AnswerRe: string process Pin
Antony M Kancidrowski8-Feb-07 2:02
Antony M Kancidrowski8-Feb-07 2:02 
GeneralRe: string process Pin
Mohammad Daba'an8-Feb-07 2:06
Mohammad Daba'an8-Feb-07 2:06 
GeneralRe: string process Pin
Antony M Kancidrowski8-Feb-07 2:16
Antony M Kancidrowski8-Feb-07 2:16 
GeneralRe: string process Pin
Mohammad Daba'an8-Feb-07 2:23
Mohammad Daba'an8-Feb-07 2:23 
GeneralRe: string process Pin
aSarafian8-Feb-07 2:29
aSarafian8-Feb-07 2:29 
GeneralRe: string process Pin
Mohammad Daba'an9-Feb-07 20:36
Mohammad Daba'an9-Feb-07 20:36 
GeneralRe: string process Pin
Antony M Kancidrowski8-Feb-07 2:31
Antony M Kancidrowski8-Feb-07 2:31 
GeneralRe: string process Pin
Mohammad Daba'an9-Feb-07 20:36
Mohammad Daba'an9-Feb-07 20:36 
GeneralRe: string process Pin
Mohammad Daba'an9-Feb-07 22:17
Mohammad Daba'an9-Feb-07 22:17 
GeneralSolution Pin
Mohammad Daba'an10-Feb-07 0:24
Mohammad Daba'an10-Feb-07 0:24 
QuestionFetching webpages as IE/Firefox Pin
phimix8-Feb-07 1:53
phimix8-Feb-07 1:53 
AnswerRe: Fetching webpages as IE/Firefox Pin
aSarafian8-Feb-07 2:30
aSarafian8-Feb-07 2:30 

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.