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.

Number of levels in a treeview datawindow

5 posts in DataWindow Last posting was on 2008-03-19 15:52:09.0Z
MattMale Posted on 2008-03-19 12:15:43.0Z
From: "MattMale" <mmale@chubb.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Number of levels in a treeview datawindow
Lines: 8
Organization: ChubbEurope
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e103ef$1@forums-1-dub>
Date: 19 Mar 2008 04:15:43 -0800
X-Trace: forums-1-dub 1205928943 10.22.241.152 (19 Mar 2008 04:15:43 -0800)
X-Original-Trace: 19 Mar 2008 04:15:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86478
Article PK: 415737

Hello folks,
I have a non-PFC PB10.5 app.
Is there a way to programmatically determine the number of group levels in a
treeview datawindow?
Thanks
Matt


Chris Pollach Posted on 2008-03-19 14:43:11.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e103ef$1@forums-1-dub>
Subject: Re: Number of levels in a treeview datawindow
Lines: 42
Organization: STD Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e1267f@forums-1-dub>
Date: 19 Mar 2008 06:43:11 -0800
X-Trace: forums-1-dub 1205937791 10.22.241.152 (19 Mar 2008 06:43:11 -0800)
X-Original-Trace: 19 Mar 2008 06:43:11 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86481
Article PK: 415742

Matt;

This code works for me ...

Int li_count
String ls_data

DO while TRUE = TRUE
li_count ++
ls_data = dc_data.Describe("DataWindow.Tree.Level." +String (li_count) +
".Height")
IF ls_data = "!" THEN
li_count --
EXIT
END IF
Loop
MessageBox ("TV DW", "Levels=" + String (li_count))



HTH

--
Regards ... Chris
http://chrispollach.pbdjmagazine.com
,\|/,
(0 0)
-(_)-

"MattMale" <mmale@chubb.com> wrote in message
news:47e103ef$1@forums-1-dub...
> Hello folks,
> I have a non-PFC PB10.5 app.
> Is there a way to programmatically determine the number of group levels in
> a treeview datawindow?
> Thanks
> Matt
>
>


Chris Pollach Posted on 2008-03-19 15:10:24.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e103ef$1@forums-1-dub> <47e1267f@forums-1-dub>
Subject: Re: Number of levels in a treeview datawindow
Lines: 65
Organization: STD Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e12ce0$1@forums-1-dub>
Date: 19 Mar 2008 07:10:24 -0800
X-Trace: forums-1-dub 1205939424 10.22.241.152 (19 Mar 2008 07:10:24 -0800)
X-Original-Trace: 19 Mar 2008 07:10:24 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86483
Article PK: 415744

Here ... better structured code for the loop:

DO while TRUE = TRUE
ls_data = dc_data.Describe("DataWindow.Tree.Level." + String (li_count +
1) + ".Height")
IF ls_data = "!" THEN
EXIT
else
li_count ++
END IF
Loop


:-)

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:47e1267f@forums-1-dub...
> Matt;
>
> This code works for me ...
>
> Int li_count
> String ls_data
>
> DO while TRUE = TRUE
> li_count ++
> ls_data = dc_data.Describe("DataWindow.Tree.Level." +String (li_count)
> + ".Height")
> IF ls_data = "!" THEN
> li_count --
> EXIT
> END IF
> Loop
> MessageBox ("TV DW", "Levels=" + String (li_count))
>
>
>
> HTH
>
> --
> Regards ... Chris
> http://chrispollach.pbdjmagazine.com
> ,\|/,
> (0 0)
> -(_)-
>
>
> "MattMale" <mmale@chubb.com> wrote in message
> news:47e103ef$1@forums-1-dub...
>> Hello folks,
>> I have a non-PFC PB10.5 app.
>> Is there a way to programmatically determine the number of group levels
>> in a treeview datawindow?
>> Thanks
>> Matt
>>
>>
>
>


MattMale Posted on 2008-03-19 15:52:09.0Z
From: "MattMale" <mmale@chubb.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <47e103ef$1@forums-1-dub> <47e1267f@forums-1-dub> <47e12ce0$1@forums-1-dub>
Subject: Re: Number of levels in a treeview datawindow
Lines: 72
Organization: ChubbEurope
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e136a9@forums-1-dub>
Date: 19 Mar 2008 07:52:09 -0800
X-Trace: forums-1-dub 1205941929 10.22.241.152 (19 Mar 2008 07:52:09 -0800)
X-Original-Trace: 19 Mar 2008 07:52:09 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86485
Article PK: 415746

Great - many thanks for your help, Chris and Jason.
Best, Matt

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:47e12ce0$1@forums-1-dub...
>
> Here ... better structured code for the loop:
>
> DO while TRUE = TRUE
> ls_data = dc_data.Describe("DataWindow.Tree.Level." + String (li_count +
> 1) + ".Height")
> IF ls_data = "!" THEN
> EXIT
> else
> li_count ++
> END IF
> Loop
>
>
> :-)
>
>
>
>
> "Chris Pollach" <cpollach@travel-net.com> wrote in message
> news:47e1267f@forums-1-dub...
>> Matt;
>>
>> This code works for me ...
>>
>> Int li_count
>> String ls_data
>>
>> DO while TRUE = TRUE
>> li_count ++
>> ls_data = dc_data.Describe("DataWindow.Tree.Level." +String (li_count)
>> + ".Height")
>> IF ls_data = "!" THEN
>> li_count --
>> EXIT
>> END IF
>> Loop
>> MessageBox ("TV DW", "Levels=" + String (li_count))
>>
>>
>>
>> HTH
>>
>> --
>> Regards ... Chris
>> http://chrispollach.pbdjmagazine.com
>> ,\|/,
>> (0 0)
>> -(_)-
>>
>>
>> "MattMale" <mmale@chubb.com> wrote in message
>> news:47e103ef$1@forums-1-dub...
>>> Hello folks,
>>> I have a non-PFC PB10.5 app.
>>> Is there a way to programmatically determine the number of group levels
>>> in a treeview datawindow?
>>> Thanks
>>> Matt
>>>
>>>
>>
>>
>
>


Jason 'Bug' Fenter [TeamSybase] Posted on 2008-03-19 14:04:52.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Number of levels in a treeview datawindow
References: <47e103ef$1@forums-1-dub>
In-Reply-To: <47e103ef$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <47e11d84$1@forums-1-dub>
Date: 19 Mar 2008 06:04:52 -0800
X-Trace: forums-1-dub 1205935492 10.22.241.152 (19 Mar 2008 06:04:52 -0800)
X-Original-Trace: 19 Mar 2008 06:04:52 -0800, vip152.sybase.com
Lines: 13
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:86480
Article PK: 415749


MattMale wrote:
> Hello folks,
> I have a non-PFC PB10.5 app.
> Is there a way to programmatically determine the number of group levels in a
> treeview datawindow?
> Thanks
> Matt

I could have sworn that was a standard property somewhere, but I don't
see it. What you can do, though, is do a loop querying
<DW Control Name>.Describe("DataWindow.Header.<group #>.Height")
until it comes back with "!". Once you get "!", you've gone one too far.