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.

Can you search for a value in a treeview?

4 posts in Objects Last posting was on 2007-09-05 14:52:04.0Z
Barbara Posted on 2007-09-04 19:54:28.0Z
Sender: 6703.46ddb4a6.1804289383@sybase.com
From: Barbara
Newsgroups: sybase.public.powerbuilder.objects
Subject: Can you search for a value in a treeview?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46ddb7f4.677f.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Sep 2007 12:54:28 -0700
X-Trace: forums-1-dub 1188935668 10.22.241.41 (4 Sep 2007 12:54:28 -0700)
X-Original-Trace: 4 Sep 2007 12:54:28 -0700, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9443
Article PK: 736601

I have a treeview with 3 levels: company, substation, and
transformer. I also have a search datawindow with 3
corresponding dropdowns so that they can find a sub easily
since they don't always know the sub's company. For example,
if they select Substation 'B' from the dropdown, it should
open up the Sub's company and highlight Sub 'B' in the
treeview. I can't figure out how to find the row in the
treeview that matches the value in the dropdown. Has
anyone done this?? Thanks....


Philip Salgannik Posted on 2007-09-04 22:08:17.0Z
Reply-To: "Philip Salgannik" <PhilipSalgannik@work.com>
From: "Philip Salgannik" <PhilipSalgannik@work.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <46ddb7f4.677f.1681692777@sybase.com>
Subject: Re: Can you search for a value in a treeview?
Lines: 22
Organization: ATWORK
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: host41.155.212.59.conversent.net
X-Original-NNTP-Posting-Host: host41.155.212.59.conversent.net
Message-ID: <46ddd751$1@forums-1-dub>
Date: 4 Sep 2007 15:08:17 -0700
X-Trace: forums-1-dub 1188943697 155.212.59.41 (4 Sep 2007 15:08:17 -0700)
X-Original-Trace: 4 Sep 2007 15:08:17 -0700, host41.155.212.59.conversent.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9445
Article PK: 736602

FindItem PowerScript function (Syntax 4 For TreeView controls) is the main
function for traversing the treeview.
But if you want to do some upfront work, nothing precludes you from
remembering the item handles of the treeview items you are inserting during
population of the tree (let's say in a datastore that retrieved the info
from the database). Actually even if it does not come from the database, you
still can use this technique. Since you have a defined depth of the tree
hierarchy, then it will be a matter of constructing the find string to do a
find in the above mentioned datastore, and using the remembered item handle
to quickly find it in the treeview...

<Barbara> wrote in message news:46ddb7f4.677f.1681692777@sybase.com...
>I have a treeview with 3 levels: company, substation, and
> transformer. I also have a search datawindow with 3
> corresponding dropdowns so that they can find a sub easily
> since they don't always know the sub's company. For example,
> if they select Substation 'B' from the dropdown, it should
> open up the Sub's company and highlight Sub 'B' in the
> treeview. I can't figure out how to find the row in the
> treeview that matches the value in the dropdown. Has
> anyone done this?? Thanks....


Barbara Posted on 2007-09-05 14:22:36.0Z
Sender: 67be.46ddb98d.1804289383@sybase.com
From: Barbara
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Can you search for a value in a treeview?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46debbab.7f87.1681692777@sybase.com>
References: <46ddd751$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Sep 2007 07:22:36 -0700
X-Trace: forums-1-dub 1189002156 10.22.241.41 (5 Sep 2007 07:22:36 -0700)
X-Original-Trace: 5 Sep 2007 07:22:36 -0700, 10.22.241.41
Lines: 3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9452
Article PK: 736610

Thank you for the response. How do you get the handle?
I assume that you must get it when you're loading the
treeview from the datastore - but I can't figure out how.


Philip Salgannik Posted on 2007-09-05 14:52:04.0Z
Reply-To: "Philip Salgannik" <PhilipSalgannik@work.com>
From: "Philip Salgannik" <PhilipSalgannik@work.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <46ddd751$1@forums-1-dub> <46debbab.7f87.1681692777@sybase.com>
Subject: Re: Can you search for a value in a treeview?
Lines: 8
Organization: ATWORK
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.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: host41.155.212.59.conversent.net
X-Original-NNTP-Posting-Host: host41.155.212.59.conversent.net
Message-ID: <46dec294$1@forums-1-dub>
Date: 5 Sep 2007 07:52:04 -0700
X-Trace: forums-1-dub 1189003924 155.212.59.41 (5 Sep 2007 07:52:04 -0700)
X-Original-Trace: 5 Sep 2007 07:52:04 -0700, host41.155.212.59.conversent.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9453
Article PK: 736611

Correct. InsertItem and InsertItemXXX functions return a handle of the newly
inserted item ...

<Barbara> wrote in message news:46debbab.7f87.1681692777@sybase.com...
> Thank you for the response. How do you get the handle?
> I assume that you must get it when you're loading the
> treeview from the datastore - but I can't figure out how.