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 Presentation Style help in getting the value of the object that represents the level clicked on.

2 posts in DataWindow Last posting was on 2009-08-27 20:23:57.0Z
Chris Fauvel Posted on 2009-08-26 21:58:20.0Z
From: "Chris Fauvel" <Chris.Fauvel@gte.net>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: TreeView Presentation Style help in getting the value of the object that represents the level clicked on.
Lines: 83
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.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a95affc$1@forums-1-dub>
Date: 26 Aug 2009 14:58:20 -0700
X-Trace: forums-1-dub 1251323900 10.22.241.152 (26 Aug 2009 14:58:20 -0700)
X-Original-Trace: 26 Aug 2009 14:58:20 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89839
Article PK: 419027

Help I have the following heirarchy being represented in a treeview DW,
based on a Stored Procedure

level nameOfLevel dwo.name
1 vtkclient vtkclient_1
2 region region_1
3 mgmtco mgmtco_1
4 brand brand_1
detailband vtkclient, region,
mgmtco, brand as invisible columns, and various other visible columns

The screen is separated into two DWs, the left is the treeview, to the right
is a list of detail bands dragged from left to right.


if the data looks like

Level NameofLevel value
1 vtkclient 'client1'
2 region 'east'
3 mgmtco 'Sentry Mgmt'
4 brand 'Kraft'
detail
invisible ->'client1','east','Sentry Mgmt','Kraft'
visible -> store #123, fl
detail
invisible ->'client1','east','Sentry Mgmt','Kraft'
visible -> store #231, ME
2 region 'west'
3 mgmtco 'Sentry Mgmt'
4 brand 'Kraft'
detail invisible ->
'client1','west','Sentry Mgmt','Kraft' visible -> store
#333, FL
detail invisible ->
'client1','west','Sentry Mgmt','Kraft' visible -> store
#444, MI
4 brand 'Applebees'
detail invisible ->
'client1','west','Sentry Mgmt','applebees' visible -> store
#333, AK
detail invisible ->
'client1','west','Sentry Mgmt','applebees' visible -> store
#444, NM
1 vtkclient client2
2 region east
3 mgmtco 'Sentry Mgmt'
<<<<------
4 brand 'Chilis'
Detail invisible ->
'client2','East','Sentry Mgmt','Chilis' visible -> store #623,
AK
Detail invisible ->
'client2','East','Sentry Mgmt','Chilis' visible -> store #629,
AK
4 brand 'Applebees'
Detail invisible ->
'client2','East','Sentry Mgmt','Applebees'visible -> store #6222, AK
3 mgmtco 'Franks Mgmt'
4 brand 'Applebees'
Detail invisible ->
'client2','East','Franks Mgmt','Applebees' visible -> store #6262, WV
2 region west
3 mgmtco 'Franks Mgmt'
4 brand 'Sonnys'
Detail invisible ->
'client2','West','Franks Mgmt',''Sonnys' visible -> store #699, WV

if my user clicks on the tree node where the <<<<------ is; currently I can
get the values I need if the treeNodeSelected event is fired.
The ROW value would be 7 and knowing the grouplevel of 3 I can get the value
'Sentry Mgmt' from Dw_1.object.mgmtco[7]

But I don't know how to get the right values in the Clicked Event or the
lbuttondown event to start a Drag session. The value of ROW is 0 if I click
on the word 'Sentry Mgmt', I know the DWO.name is mgmtco_1, but can't get
the value 'Sentry Mgmt'

Does anybody have a suggestion or some reading I could do?

Chris


Arnd Schmidt Posted on 2009-08-27 20:23:57.0Z
From: Arnd Schmidt <arnd.schmidt@gmx.de>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: TreeView Presentation Style help in getting the value of the object that represents the level clicked on.
Message-ID: <fkqd95phkpsaaqpmnn9qd47schd76jv4eh@4ax.com>
References: <4a95affc$1@forums-1-dub>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 27 Aug 2009 13:23:57 -0700
X-Trace: forums-1-dub 1251404637 10.22.241.152 (27 Aug 2009 13:23:57 -0700)
X-Original-Trace: 27 Aug 2009 13:23:57 -0700, vip152.sybase.com
Lines: 93
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89847
Article PK: 419035

Use GetObjectAtPointer() ;-)

hth

Arnd

On 26 Aug 2009 14:58:20 -0700, "Chris Fauvel" <Chris.Fauvel@gte.net> wrote:

>Help I have the following heirarchy being represented in a treeview DW,
>based on a Stored Procedure
>
>level nameOfLevel dwo.name
>1 vtkclient vtkclient_1
> 2 region region_1
> 3 mgmtco mgmtco_1
> 4 brand brand_1
> detailband vtkclient, region,
>mgmtco, brand as invisible columns, and various other visible columns
>
>The screen is separated into two DWs, the left is the treeview, to the right
>is a list of detail bands dragged from left to right.
>
>
>if the data looks like
>
>Level NameofLevel value
>1 vtkclient 'client1'
> 2 region 'east'
> 3 mgmtco 'Sentry Mgmt'
> 4 brand 'Kraft'
> detail
> invisible ->'client1','east','Sentry Mgmt','Kraft'
>visible -> store #123, fl
> detail
> invisible ->'client1','east','Sentry Mgmt','Kraft'
>visible -> store #231, ME
> 2 region 'west'
> 3 mgmtco 'Sentry Mgmt'
> 4 brand 'Kraft'
> detail invisible ->
>'client1','west','Sentry Mgmt','Kraft' visible -> store
>#333, FL
> detail invisible ->
>'client1','west','Sentry Mgmt','Kraft' visible -> store
>#444, MI
> 4 brand 'Applebees'
> detail invisible ->
>'client1','west','Sentry Mgmt','applebees' visible -> store
>#333, AK
> detail invisible ->
>'client1','west','Sentry Mgmt','applebees' visible -> store
>#444, NM
>1 vtkclient client2
> 2 region east
> 3 mgmtco 'Sentry Mgmt'
><<<<------
> 4 brand 'Chilis'
> Detail invisible ->
>'client2','East','Sentry Mgmt','Chilis' visible -> store #623,
>AK
> Detail invisible ->
>'client2','East','Sentry Mgmt','Chilis' visible -> store #629,
>AK
> 4 brand 'Applebees'
> Detail invisible ->
>'client2','East','Sentry Mgmt','Applebees'visible -> store #6222, AK
> 3 mgmtco 'Franks Mgmt'
> 4 brand 'Applebees'
> Detail invisible ->
>'client2','East','Franks Mgmt','Applebees' visible -> store #6262, WV
> 2 region west
> 3 mgmtco 'Franks Mgmt'
> 4 brand 'Sonnys'
> Detail invisible ->
>'client2','West','Franks Mgmt',''Sonnys' visible -> store #699, WV
>
>if my user clicks on the tree node where the <<<<------ is; currently I can
>get the values I need if the treeNodeSelected event is fired.
>The ROW value would be 7 and knowing the grouplevel of 3 I can get the value
>'Sentry Mgmt' from Dw_1.object.mgmtco[7]
>
>But I don't know how to get the right values in the Clicked Event or the
>lbuttondown event to start a Drag session. The value of ROW is 0 if I click
>on the word 'Sentry Mgmt', I know the DWO.name is mgmtco_1, but can't get
>the value 'Sentry Mgmt'
>
>Does anybody have a suggestion or some reading I could do?
>
>Chris
>