Having Trouble with Tree Views

xMax

Registered User.
Local time
Today, 08:04
Joined
Aug 7, 2006
Messages
35
I have to add a TreeView for a form.

This treeview must have 3 nodes, and each node contains simple information based on a value selected from a combo box. The samples I have seen all have added features that I do not want or need. There are 4 tables involved.

Let's say I work for a State's Correctional System:

Table A contains inmateID (all inmates are to have an ID number; and name selected from a combo box in form which chooses what info appears in treeview, name field is called inmateName)

Person #1: inmateID is 1, name is Bill Burgler
Person #2: inmateID is 2, name is Aaron Killer
Person #3: inmateID is 3, name is Fred Cheat
Person #4: inmateID is 4, name is Paul Crack
Person #5: inmateID is 5, name is Dan Gimmeallyourmoney

For now, we'll say there are 5 people

Table B contains information about the crime they commited (has inmateID to identify the inmate who committed the crime, and crimeCommitted to identify what crime they commited, and dateCommitted to indentify the date that the crime was committed on)

inmateID 1 committed burglary on 4/2/2005
inmateID 2 committed murder (1st) on 5/6/06 and kidnapping on 5/6/2006
inmateID 3 committed fraud on 3/23/2003
inmateID 4 committed a drug offence on 1/29/2002
inmateID 5 committed three robberies, two of them were on 10/19/2005 and the other one was on 12/20/2005

Table C contains information about the prison time that each person must serve (has inmateID to identify the inmate and sentenceTime to identify the sentence)

inmateID 1 is serving 15 years
inmateID 2 is on death row (written as Death in table)
inmateID 3 is serving 2 years
inmateID 4 is serving 1 year
inmateID 5 has a Life Sentence

Table D contains information about the prison where each person is serving their time (has inmateID to identify the inmate, prisonName to identify the prison, and securityLevel to identify the security level)

inmateID 1 is in BurglaryisBad Correctional Facility (security level B)
inmateID 2 is in ThePrisonofNoEscape-Max Security Prison (security level X)
inmateID 3 is in DontCheatOffOfOthers Correctional Facility (security level C)
inmateID 4 is in DirtyDrugsMakeYouStink Drug Rehab Center (security level C)
inmateID 5 is in ThePrisonofNoEscape-Max Security Prison (security level A)

Anyways, I need a treeview so I can select an Inmate off a combobox and have a treeview of appear like this:

Info About (inmateName goes here, and this is the main Node)
Crime Committed (sub node of the main node)
(this is where the crimeCommitted and dateCommitted go,
one for each crime)
Sentence Time (sub node of the main node)
(this is where the sentence goes)
Prison Information
(this is where the prisonName and securityLevel go)


Please provide a very basic sample database with just a combobox and the treeview (and the tables).

This is worth some rep points.
 
Last edited:
Resolution

I noticed that no one responded to your treeview question.
Were you ever able to figure out your treeview problem?
 

Users who are viewing this thread

Back
Top Bottom