Seeking assistance populating the TreeView dataWindow
recursively. I’m using PowerBuilder 11.5.1 Build 4011 on
Windows XP SP2. My database has one table containing the
parent ID and the child ID for each record. A parent ID can
point to several child IDs. Each child ID can in turn be a
parent to further child IDs below it. Each child ID can have
one and only parent ID. I’m wondering how I can use the
treeview datawindow to recursively retrieve and present this
structure just like in the normal treeview control. When I
issue a retrieve() the treeview builds the first level
parent-child relationship only but does NOT build the
parent-child structure for lower level child nodes that are
parents to other child nodes.
Thanks very much for your assistance
Ray KAUSAE
<Ray KAUSAE> wrote in message news:4aa5ae8e.6b9...@sybase.com...
Many thanks
Ray Kausae
--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
"Jeremy Lakeman" <jeremy....@gmail.com> wrote in message
news:df264646-3aef-46a2...@m20g2000vbp.googlegroups.com...
You *could* simulate this in a datawindow, retrieving a datastore and
moving the rows as each image is clicked for the first time. Using an
expression for the x property of everything so they move over based on
which level they are on... etc etc.
But a treeview would be much simpler.
On Sep 9, 5:41 am, "Jerry Siegel [TeamSybase]"
<jNOsSPAMsiegel@yahoo!.com> wrote:
> It is true that there a fixed number of levels set at design time. I haven't
> tried adding or removing them at run time but I suspect it would be ugly. If
> you need the depth to be open ended you may want to use a treeview
> *control* - there is an example in the HTML books for populating a treeview
> from data in a datastore.
>
> --
> Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
> Product Enhancement Requests:http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
> "Jeremy Lakeman" <jeremy.lake...@gmail.com> wrote in message
--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement
"Jeremy Lakeman" <jeremy....@gmail.com> wrote in message
news:6568d079-7d72-4061...@s31g2000yqs.googlegroups.com...
MSSQL server 2005 also has support for a recursive build of a result
set. if using that DB look at the CTE.
I build my result set from the stored procedure and is displayed in
the treeview DW.
Mine tree looks like
Parent
child 1
grand child 1
child 2
grand child 2
great grand child
grand child 3
child 3
which I think is like you want.
the caveat is that you have to retrieve all the rows first, and you
have to know how deep to go.
A true TreeView could be set up to retrieve just the parents initially
then on whatever the event is called, retrieve the rest of them after
that node..less hit on DB.
It would be very helpful for me if you could post the SQL and explain
how the groups were set in TreeView Datawindow. I have a similar
situation and struggling to find the solution.
Thanks in advance.