LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to design a listbox or tree control related to the database

Now i have a problem to design a listbox or tree control, it is designed to connect to the database, if the related element in database changed, the element in listbox or tree control should also change. i have managed to read the element in database, but i cannot input it to the listbox or tree control, since it has no input terminal that i can only use the Labeling tool and enter text into it.
 
is there any advise on it, maybe i can use another control rather than listbox or tree control. any suggestion would be appreciate.
Thank you
 
 
XuY
0 Kudos
Message 1 of 6
(3,509 Views)

Hi Xuy,

      On the front-panel, right-click on the text-ring control and select: Create\Property Node.

Then, on the diagram, right-click on the property-node and select "Strings[]".

The "strings[]" property is the array of strings available in the control - and you can change it. Smiley Happy

Cheers!

Message Edited by tbd on 04-05-2007 11:18 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 6
(3,500 Views)
Hi tbd,
Thanks for your advise, i have met my task with this approach by using listbox, but i still have trouble in applying the tree control, do you have an example of it.
0 Kudos
Message 3 of 6
(3,489 Views)

Hi Xuy,

This sounds interesting, but I need a more information (sorry if I'm "slow".)

If the database is returning an array of data/records, how do you want to fill-in the tree control?  A tree control displays a "hierarchy" and it's not clear to me how to translate a list of records to a hierarchy(?)

Can you provide some simple example?  Please show the beginning array of values (from the DB) and also how the "tree" result should appear.  Then (maybe) I can help you to populate the tree correctly.

Example records: (Name, Address, Age)

Abe, 123 LC way, 67

Babe, 234 FW Park ave, 3

Coulter, 111 DC Rd., 48

Please illustrate the "tree"!

Cheers!

Message Edited by tbd on 04-06-2007 01:28 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 4 of 6
(3,477 Views)
Hi tbd,
Thank you for your attention to my problem.
 
Maybe another example is more sensible
the database may like this
Ford     CD132       CD132.1
Ford     CD132       CD132.2
BMW   BMWE46   BMWE46
BMW   BMWE52   BMWE52.1
BMW   BMWE52   BMWE52.2
and the tree is
 
Ford----CD132-----CD132.1
                        -----CD132.2
BMW---BMWE46---BMWE46
         ---BMWE52---BMWE52.1
                            ---BMWE52.2
is it clear?
0 Kudos
Message 5 of 6
(3,464 Views)

Hi XuY,

      Sorry for the long delay (we were "experiencing technical difficulties".)  If you've worked this out, great!

... if not, maybe this example (attached) will help.

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 6 of 6
(3,436 Views)