Click here to Skip to main content
16,008,299 members
Home / Discussions / C#
   

C#

 
GeneralRe: A problem with DataBinding. Pin
AxiliuM30-Jan-09 20:03
AxiliuM30-Jan-09 20:03 
QuestionSend e-mail with .mht body from program Pin
collapo29-Jan-09 3:47
collapo29-Jan-09 3:47 
AnswerRe: Send e-mail with .mht body from program Pin
vaghelabhavesh29-Jan-09 13:36
vaghelabhavesh29-Jan-09 13:36 
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 
Good Day Fellow Coders;

Given this string coming out of a database field (potentially 10's of thousands of records at a time).
I know that only the first sections will be unique.
I don't know how many of the other sections will be there.


strRef = "Section0.Section1.Section2.Section3.Section4.Section5.Section6.Section7.Section8.Section9"; etc...



I want to create a treeView and I want the nodes to have these properties

//what level is this node
level = level;
//create a tag id
idx = idx + 1;
//create a new tree node
Node = new TreeNode(Name);
//name it
Node.Name = Name;
//give it some text
Node.Text = Name;
//create the tag id
Node.Tag = level + idx;
//assign an image depending on level
Node.ImageIndex = 1;
//assign a selected image depending on level
Node.SelectedImageIndex = 1;

I have done this with spaghetti code about 822 lines but it's only about 97% reliable but all the properties get assigned.

I have also done this using recursion it is 100% reliable but I don't know how to assign the different properties during the recursion process.

I have been working on this a few weeks I have read a couple of books recommended by you folks and have learned a whole lot about how to make a folder browser but this is not quite the same. But I have not been able to solve this yet.

I'm stuck can anyone get me movin in a right direction again.

TIA
Rafone

Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
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 
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 

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.