Click here to Skip to main content
15,919,245 members
Home / Discussions / C#
   

C#

 
AnswerRe: creating prime events for a control Pin
Wjousts13-Oct-06 10:34
Wjousts13-Oct-06 10:34 
GeneralRe: creating prime events for a control Pin
Nadia Monalisa13-Oct-06 10:41
Nadia Monalisa13-Oct-06 10:41 
AnswerRe: creating prime events for a control Pin
Nader Elshehabi13-Oct-06 12:05
Nader Elshehabi13-Oct-06 12:05 
QuestionMonitor Browser Externally Pin
Victor M. Bello A.13-Oct-06 8:07
Victor M. Bello A.13-Oct-06 8:07 
AnswerRe: Monitor Browser Externally Pin
Victor M. Bello A.13-Oct-06 9:36
Victor M. Bello A.13-Oct-06 9:36 
AnswerRe: Monitor Browser Externally Pin
seannyc13-Oct-06 10:32
seannyc13-Oct-06 10:32 
GeneralRe: Monitor Browser Externally Pin
Victor M. Bello A.16-Oct-06 6:57
Victor M. Bello A.16-Oct-06 6:57 
QuestionKeeping track of ID information with a TreeView Pin
shultas13-Oct-06 7:41
shultas13-Oct-06 7:41 
Hello Everyone,

Does anyone know of a way to populate a TreeView with information from a table in a database and keep track of the unique identifier for that record? I can't really explain it well in words, but there are reasons why I cannot do a "SELECT WHERE XXX = 'e.Node.Text'" (off of the TreeView_AfterSelect. What I did at one point was actually store the file id's inside the treeview, enclosed in [ ]'s and did parsing to figure out which FILE_ID it was, and then I could pull up the information that way, but it looks ugly. e.g.

Parent
|
------- Child [1]
------- Child [2]

Where 1 and 2 are the unique key identifiers of that particular record in the database. I am just not sure how to go about linking a unique ID to every node in a TreeView without actually putting the ID right in the text for that particular node. I tried to populate an ArrayList with a structure that held the child's name and the ID for that child, and then iterate through the ArrayList when the treeview is clicked and find it ... but there can be duplicate entries in the database that have the same parent name and same child name.

So basically the question is, when working with a TreeView and populating it from a database where the only thing that you can be sure is unique is the ID unique key ... How to do track that key with each node to ensure that when you click on a node you are pulling the proper record out of the database?

Hopefully I made sense here. I rewrote this three times. I just can't really think of how to put this into words correctly.
AnswerRe: Keeping track of ID information with a TreeView Pin
mav.northwind13-Oct-06 9:18
mav.northwind13-Oct-06 9:18 
GeneralRe: Keeping track of ID information with a TreeView Pin
shultas13-Oct-06 11:45
shultas13-Oct-06 11:45 
QuestionString.Trim error Pin
User 309585913-Oct-06 7:13
User 309585913-Oct-06 7:13 
AnswerRe: String.Trim error Pin
Christian Graus13-Oct-06 7:22
protectorChristian Graus13-Oct-06 7:22 
GeneralRe: String.Trim error Pin
User 309585913-Oct-06 7:28
User 309585913-Oct-06 7:28 
AnswerRe: String.Trim error Pin
Nader Elshehabi13-Oct-06 11:54
Nader Elshehabi13-Oct-06 11:54 
GeneralRe: String.Trim error Pin
User 309585913-Oct-06 12:01
User 309585913-Oct-06 12:01 
AnswerRe: String.Trim error Pin
greyzz13-Oct-06 20:11
greyzz13-Oct-06 20:11 
QuestionMaster Card imp File Parsing Pin
Samarjit Chavan13-Oct-06 6:39
Samarjit Chavan13-Oct-06 6:39 
AnswerRe: Master Card ipm File Parsing Pin
Samarjit Chavan13-Oct-06 6:40
Samarjit Chavan13-Oct-06 6:40 
GeneralRe: Master Card ipm File Parsing Pin
WillemM13-Oct-06 9:27
WillemM13-Oct-06 9:27 
QuestionLooping through a datagrid Pin
scotlandc13-Oct-06 6:28
scotlandc13-Oct-06 6:28 
AnswerRe: Looping through a datagrid Pin
Private_Void13-Oct-06 6:38
Private_Void13-Oct-06 6:38 
QuestionGetting Data from DataView Pin
hotnreddyfreddy13-Oct-06 6:25
hotnreddyfreddy13-Oct-06 6:25 
AnswerRe: Getting Data from DataView Pin
Nadia Monalisa13-Oct-06 9:49
Nadia Monalisa13-Oct-06 9:49 
QuestionEquivalent of IFrame Pin
JohnBond31113-Oct-06 6:18
JohnBond31113-Oct-06 6:18 
AnswerRe: Equivalent of IFrame Pin
Guffa13-Oct-06 6:32
Guffa13-Oct-06 6:32 

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.