Click here to Skip to main content
16,005,376 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Dynamically Creating Treeview Nodes Question Pin
Rafone29-Jan-09 11:42
Rafone29-Jan-09 11:42 
maybe this would help...this is the recursion I am currently using.
fullRef is the name of the variable from the database
Now in here I'm not sure where I can add properties to the Nodes.

string[] strArr = fullRef.Split('.');
List<string> NODES = new List<string>(); //Save nodes
foreach (string str in strArr)
NODES.Add(str);
InsertNodes(treeView1.Nodes, NODES);
}
treeView1.CollapseAll();
treeView1.SelectedNode = treeView1.SelectedNode = treeView1.Nodes[0].Nodes[0].Nodes[0];
treeView1.EndUpdate();
this.Cursor = Cursors.Default;
}
}


TreeNode AddNode(TreeNodeCollection Parent, string text)
{
TreeNode temporaryNode;

foreach (TreeNode node in Parent)
{

if (node.Text == text)
{
return node;
}
}
return Parent.Add(text);
}

void InsertNodes(TreeNodeCollection treeviewNodes, List<string> _nodes)
{
if (_nodes.Count == 0)
return; //Recursive exit
TreeNode TempNode = AddNode(treeviewNodes, _nodes[0]);
_nodes.RemoveAt(0);
InsertNodes(TempNode.Nodes, _nodes); //Recursive calling
}


TIA
Rafone

Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...

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 
GeneralRe: how to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 2:08
Swati Khanna29-Jan-09 2:08 

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.