Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

TreeView DW Presentation Style Help retrieving Recursively

9 posts in DataWindow Last posting was on 2009-09-29 14:13:02.0Z
Ray KAUSAE Posted on 2009-09-08 01:08:30.0Z
Sender: 6af0.4aa5a8c2.1804289383@sybase.com
From: Ray KAUSAE
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: TreeView DW Presentation Style Help retrieving Recursively
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4aa5ae8e.6b91.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Sep 2009 18:08:30 -0700
X-Trace: forums-1-dub 1252372110 10.22.241.41 (7 Sep 2009 18:08:30 -0700)
X-Original-Trace: 7 Sep 2009 18:08:30 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89917
Article PK: 419105

Hi,

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


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-09-08 01:51:19.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4aa5ae8e.6b91.1681692777@sybase.com>
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa5b897@forums-1-dub>
Date: 7 Sep 2009 18:51:19 -0700
X-Trace: forums-1-dub 1252374679 10.22.241.152 (7 Sep 2009 18:51:19 -0700)
X-Original-Trace: 7 Sep 2009 18:51:19 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89918
Article PK: 419106

That is probably best done in the SQL. Some DBMS, including SQL Anywhere 11
and Oracle support recursive hierarchical queries for such structures as
organization charts and bill of materials.
SQLA example from the help file:
WITH RECURSIVE
manager ( EmployeeID, ManagerID,
GivenName, Surname, mgmt_level ) AS
( ( SELECT EmployeeID, ManagerID, -- initial subquery
GivenName, Surname, 0
FROM Employees AS e
WHERE ManagerID = EmployeeID )
UNION ALL
( SELECT e.EmployeeID, e.ManagerID, -- recursive subquery
e.GivenName, e.Surname, m.mgmt_level + 1
FROM Employees AS e JOIN manager AS m
ON e.ManagerID = m.EmployeeID
AND e.ManagerID <> e.EmployeeID
AND m.mgmt_level < 20 ) )
SELECT * FROM manager
ORDER BY mgmt_level, Surname, GivenName;
--
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


<Ray KAUSAE> wrote in message news:4aa5ae8e.6b91.1681692777@sybase.com...
Hi,

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 Posted on 2009-09-08 05:39:20.0Z
Sender: 6af0.4aa5a8c2.1804289383@sybase.com
From: Ray KAUSAE
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4aa5ee08.72c0.1681692777@sybase.com>
References: <4aa5b897@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Sep 2009 22:39:20 -0700
X-Trace: forums-1-dub 1252388360 10.22.241.41 (7 Sep 2009 22:39:20 -0700)
X-Original-Trace: 7 Sep 2009 22:39:20 -0700, 10.22.241.41
Lines: 57
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89920
Article PK: 419108

Thanks very much. Will try this approach using a stored
procedure.

Many thanks
Ray Kausae

> That is probably best done in the SQL. Some DBMS,
> including SQL Anywhere 11 and Oracle support recursive
> hierarchical queries for such structures as organization
> charts and bill of materials. SQLA example from the help
> file: WITH RECURSIVE
> manager ( EmployeeID, ManagerID,
> GivenName, Surname, mgmt_level ) AS
> ( ( SELECT EmployeeID, ManagerID, -- initial
> subquery
> GivenName, Surname, 0
> FROM Employees AS e
> WHERE ManagerID = EmployeeID )
> UNION ALL
> ( SELECT e.EmployeeID, e.ManagerID, -- recursive
> subquery
> e.GivenName, e.Surname, m.mgmt_level + 1
> FROM Employees AS e JOIN manager AS m
> ON e.ManagerID = m.EmployeeID
> AND e.ManagerID <> e.EmployeeID
> AND m.mgmt_level < 20 ) )
> SELECT * FROM manager
> ORDER BY mgmt_level, Surname, GivenName;
> --
> 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
>
>
> <Ray KAUSAE> wrote in message
> news:4aa5ae8e.6b91.1681692777@sybase.com... Hi,
>
> 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
>
>


Jeremy Lakeman Posted on 2009-09-08 04:09:57.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Date: Mon, 7 Sep 2009 21:09:57 -0700 (PDT)
Organization: http://groups.google.com
Lines: 23
Message-ID: <df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com>
References: <4aa5ae8e.6b91.1681692777@sybase.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252382997 9514 127.0.0.1 (8 Sep 2009 04:09:57 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Sep 2009 04:09:57 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m20g2000vbp.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!transit4.readnews.com!postnews.google.com!m20g2000vbp.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89919
Article PK: 419107

I don't think the treeview style really supports that as it has a
limited number of levels in the definition.

On Sep 8, 10:08 am, Ray KAUSAE wrote:
> Hi,
>
> 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


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-09-08 20:41:20.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4aa5ae8e.6b91.1681692777@sybase.com> <df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com>
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa6c170$1@forums-1-dub>
Date: 8 Sep 2009 13:41:20 -0700
X-Trace: forums-1-dub 1252442480 10.22.241.152 (8 Sep 2009 13:41:20 -0700)
X-Original-Trace: 8 Sep 2009 13:41:20 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89928
Article PK: 419117

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.lakeman@gmail.com> wrote in message
news:df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com...
I don't think the treeview style really supports that as it has a
limited number of levels in the definition.

On Sep 8, 10:08 am, Ray KAUSAE wrote:
> Hi,
>
> 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


Jeremy Lakeman Posted on 2009-09-08 23:59:13.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Date: Tue, 8 Sep 2009 16:59:13 -0700 (PDT)
Organization: http://groups.google.com
Lines: 54
Message-ID: <6568d079-7d72-4061-8160-ff69a8a45555@s31g2000yqs.googlegroups.com>
References: <4aa5ae8e.6b91.1681692777@sybase.com> <df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com> <4aa6c170$1@forums-1-dub>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252454353 32419 127.0.0.1 (8 Sep 2009 23:59:13 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Sep 2009 23:59:13 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s31g2000yqs.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!s31g2000yqs.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89929
Article PK: 419115

Or...
A treeview data window is just a couple of images that trigger the
display of rows and bands to be toggled.

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
>
> news:df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com...
> I don't think the treeview style really supports that as it has a
> limited number of levels in the definition.
>
> On Sep 8, 10:08 am, Ray KAUSAE wrote:
>
> > Hi,
>
> > 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


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-09-09 02:46:15.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4aa5ae8e.6b91.1681692777@sybase.com> <df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com> <4aa6c170$1@forums-1-dub> <6568d079-7d72-4061-8160-ff69a8a45555@s31g2000yqs.googlegroups.com>
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa716f7@forums-1-dub>
Date: 8 Sep 2009 19:46:15 -0700
X-Trace: forums-1-dub 1252464375 10.22.241.152 (8 Sep 2009 19:46:15 -0700)
X-Original-Trace: 8 Sep 2009 19:46:15 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89930
Article PK: 419118

IIRC the PowerTOOL framework (PB3/4 era, pre-PFC) had a pure PB tab user
object (native didn't arrive until PB5), a dropdown calendar, and a
treeview - done with DWs created on the fly.

--
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.lakeman@gmail.com> wrote in message
news:6568d079-7d72-4061-8160-ff69a8a45555@s31g2000yqs.googlegroups.com...
Or...
A treeview data window is just a couple of images that trigger the
display of rows and bands to be toggled.

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
>
> news:df264646-3aef-46a2-8117-5da2f2bf9f2f@m20g2000vbp.googlegroups.com...
> I don't think the treeview style really supports that as it has a
> limited number of levels in the definition.
>
> On Sep 8, 10:08 am, Ray KAUSAE wrote:
>
> > Hi,
>
> > 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


Chris Fauvel Posted on 2009-09-10 12:47:32.0Z
From: Chris Fauvel <avachet1965@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Date: Thu, 10 Sep 2009 05:47:32 -0700 (PDT)
Organization: http://groups.google.com
Lines: 45
Message-ID: <c05e5c70-cf5b-42cd-834a-0d0b944ffb7d@j19g2000yqk.googlegroups.com>
References: <4aa5ae8e.6b91.1681692777@sybase.com>
NNTP-Posting-Host: 64.203.106.198
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252586853 9159 127.0.0.1 (10 Sep 2009 12:47:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 10 Sep 2009 12:47:33 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j19g2000yqk.googlegroups.com; posting-host=64.203.106.198; posting-account=DJjFPAoAAAAeQvDjk3ABu2l0irywGuZP
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; yie8),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!j19g2000yqk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89939
Article PK: 419127


On Sep 7, 9:08 pm, Ray KAUSAE wrote:
> Hi,
>
> 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

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.


Skumar Posted on 2009-09-29 14:13:02.0Z
From: Skumar <jolly_bird@hotmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView DW Presentation Style Help retrieving Recursively
Date: Tue, 29 Sep 2009 07:13:02 -0700 (PDT)
Organization: http://groups.google.com
Lines: 33
Message-ID: <38531f9a-ab79-4900-8308-b6edf88e07b4@o10g2000yqa.googlegroups.com>
References: <4aa5ae8e.6b91.1681692777@sybase.com> <c05e5c70-cf5b-42cd-834a-0d0b944ffb7d@j19g2000yqk.googlegroups.com>
NNTP-Posting-Host: 82.33.245.2
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1254233582 7189 127.0.0.1 (29 Sep 2009 14:13:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 29 Sep 2009 14:13:02 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o10g2000yqa.googlegroups.com; posting-host=82.33.245.2; posting-account=blZptAoAAABpr8wLoPd2HT_WVo_eZhLn
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!o10g2000yqa.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90013
Article PK: 419204

Hello Chris Fauvel,

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.

>
> 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.