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.

Help required with 2 linked data window

2 posts in DataWindow Last posting was on 2009-05-31 12:58:14.0Z
rkononov Posted on 2009-05-31 05:22:48.0Z
From: rkononov <RKononov@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Help required with 2 linked data window
Date: Sat, 30 May 2009 22:22:48 -0700 (PDT)
Organization: http://groups.google.com
Lines: 14
Message-ID: <5b4f29c8-6fcc-4cff-a4b9-c08f1638b66f@g19g2000yql.googlegroups.com>
NNTP-Posting-Host: 217.29.26.68
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1243747368 2643 127.0.0.1 (31 May 2009 05:22:48 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 31 May 2009 05:22:48 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g19g2000yql.googlegroups.com; posting-host=217.29.26.68; posting-account=UFiOFAoAAADPXCrRXYmrnrNnDv_KnrQM
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.167.0 Safari/530.1,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!g19g2000yql.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89411
Article PK: 418603

I have 3 datawindow objects
1)area - list of areas
2)city - list of cities
3)Enterprise properties - property of one enterprise

and i have such problem - on Enterprise properties form must be placed
area and city dropdown lists - it's easy and i made it, but main
problem that list of cities must be filtered by area selected. I
created retrieve parameter for city list and try to retrieve city list
every time when area changing with such code
dw_citylist.retrieve(areaname)
but such code updates city list arbitrarily. Can you point me to
example ar to a way of solving this problem.
Thanks in advance.


<jeff> Posted on 2009-05-31 12:58:14.0Z
Reply-To: <jeff>
From: <jeff>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <5b4f29c8-6fcc-4cff-a4b9-c08f1638b66f@g19g2000yql.googlegroups.com>
Subject: Re: Help required with 2 linked data window
Lines: 47
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.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a227ee6$1@forums-1-dub>
Date: 31 May 2009 05:58:14 -0700
X-Trace: forums-1-dub 1243774694 10.22.241.152 (31 May 2009 05:58:14 -0700)
X-Original-Trace: 31 May 2009 05:58:14 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89412
Article PK: 418602

Where are you calling the dw_city.retrieve(areaname) from? Which event on
the areaname datawidow object? Where is the code for filtering the city
execuated?

- are you doing it on the itemchanged event of the area?
- where are you pulling / getting the areaname argument from?

if you are coding in the itemchanged event of the areaname data window,
... you will need to do the following ...

this is the quick and easy, brute force process (there are other methods /
approaches that you can play with to reduce round trips to the server - ie
buffer / sharedata / filter)

if dwo.name = 'areaname' then

dw_city.Retrieve(data)

end if

- if you are doing this in the item changed, you can not use the datawindow
buffer for getting the areaname - it has not made it to the buffer...
- so, in the itemchanged event of the datawindow ...
dw.getitemstring(row,"areaname") does not equal the value the user just
selected ... it equals the old value.
you need to use the data parameter

Jeff.

"rkononov" <RKononov@gmail.com> wrote in message
news:5b4f29c8-6fcc-4cff-a4b9-c08f1638b66f@g19g2000yql.googlegroups.com...
>I have 3 datawindow objects
> 1)area - list of areas
> 2)city - list of cities
> 3)Enterprise properties - property of one enterprise
>
> and i have such problem - on Enterprise properties form must be placed
> area and city dropdown lists - it's easy and i made it, but main
> problem that list of cities must be filtered by area selected. I
> created retrieve parameter for city list and try to retrieve city list
> every time when area changing with such code
> dw_citylist.retrieve(areaname)
> but such code updates city list arbitrarily. Can you point me to
> example ar to a way of solving this problem.
> Thanks in advance.