Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
GeneralRe: Send e-mail with .mht body from program Pin
collapo29-Jan-09 22:02
collapo29-Jan-09 22:02 
Questionaccessing database in SQL server 2005 through C# Pin
Deepali Khalkar29-Jan-09 2:35
Deepali Khalkar29-Jan-09 2:35 
AnswerRe: accessing database in SQL server 2005 through C# Pin
musefan29-Jan-09 2:45
musefan29-Jan-09 2:45 
AnswerRe: accessing database in SQL server 2005 through C# Pin
vaghelabhavesh29-Jan-09 13:28
vaghelabhavesh29-Jan-09 13:28 
QuestionDynamically Creating Treeview Nodes Question Pin
Rafone29-Jan-09 2:30
Rafone29-Jan-09 2:30 
AnswerRe: Dynamically Creating Treeview Nodes Question Pin
musefan29-Jan-09 2:44
musefan29-Jan-09 2:44 
GeneralRe: Dynamically Creating Treeview Nodes Question Pin
Rafone29-Jan-09 3:17
Rafone29-Jan-09 3:17 
AnswerRe: Dynamically Creating Treeview Nodes Question Pin
musefan29-Jan-09 3:32
musefan29-Jan-09 3:32 
ok i think i see what you want now. I will give some code guideline, sorry if its not what you need thou


foreach(DataRow row in DataTable)
{
  string[] parts = row["ColumnName"].ToString().Split('.');

  TreeNode baseNode = RootNode;//root of tree view
  foreach(string s in parts)
  {

     TreeNode temp = CheckNodeExists(s, baseNode);
     if(temp == null)
        temp = baseNode.AddNode("ID", "Name", "Image")//what ever params you need to use
     baseNode = temp;
  }
}


public TreeNode CheckNodeExists(string nodeText, TreeNodeCollection nodes)
{
    if(nodes == null || nodes.Count == 0)
       return null;

     foreach(TreeNode node in nodes)
        if(node.Text == nodeText)
               return node;

      return null;
}



Please let me know if this is not what you want and i will try to offer more help
GeneralRe: Dynamically Creating Treeview Nodes Question Pin
Rafone29-Jan-09 11:42
Rafone29-Jan-09 11:42 
Questionmemory allocated on heap in method Pin
devvvy29-Jan-09 2:14
devvvy29-Jan-09 2:14 
AnswerRe: memory allocated on heap in method Pin
Rob Philpott29-Jan-09 2:17
Rob Philpott29-Jan-09 2:17 
QuestionRe: memory allocated on heap in method Pin
Eddy Vluggen29-Jan-09 2:22
professionalEddy Vluggen29-Jan-09 2:22 
AnswerRe: memory allocated on heap in method Pin
devvvy29-Jan-09 2:27
devvvy29-Jan-09 2:27 
AnswerRe: memory allocated on heap in method Pin
Eddy Vluggen29-Jan-09 2:33
professionalEddy Vluggen29-Jan-09 2:33 
GeneralRe: memory allocated on heap in method Pin
S. Senthil Kumar29-Jan-09 3:04
S. Senthil Kumar29-Jan-09 3:04 
AnswerRe: memory allocated on heap in method Pin
Guffa29-Jan-09 5:21
Guffa29-Jan-09 5:21 
AnswerRe: memory allocated on heap in method [modified] Pin
Luc Pattyn29-Jan-09 5:30
sitebuilderLuc Pattyn29-Jan-09 5:30 
GeneralRe: memory allocated on heap in method Pin
N a v a n e e t h29-Jan-09 5:51
N a v a n e e t h29-Jan-09 5:51 
AnswerRe: memory allocated on heap in method Pin
Luc Pattyn29-Jan-09 8:54
sitebuilderLuc Pattyn29-Jan-09 8:54 
GeneralRe: memory allocated on heap in method Pin
N a v a n e e t h29-Jan-09 15:44
N a v a n e e t h29-Jan-09 15:44 
AnswerRe: memory allocated on heap in method Pin
Luc Pattyn29-Jan-09 15:52
sitebuilderLuc Pattyn29-Jan-09 15:52 
Questionhow to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 1:58
Swati Khanna29-Jan-09 1:58 
AnswerRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 1:59
musefan29-Jan-09 1:59 
GeneralRe: how to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 2:02
Swati Khanna29-Jan-09 2:02 
GeneralRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 2:03
musefan29-Jan-09 2:03 

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.