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.

how to suppress dropdown list but still wanting retrieve

4 posts in DataWindow Last posting was on 2009-09-18 19:40:05.0Z
GW Posted on 2009-09-16 23:01:54.0Z
From: "GW" <gw@gw>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: how to suppress dropdown list but still wanting retrieve
Lines: 12
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: <4ab16e62$3@forums-1-dub>
Date: 16 Sep 2009 16:01:54 -0700
X-Trace: forums-1-dub 1253142114 10.22.241.152 (16 Sep 2009 16:01:54 -0700)
X-Original-Trace: 16 Sep 2009 16:01:54 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89955
Article PK: 419141

Hi folks

I have a grid dw and have a dddw that I need to retrieve a value from an id,
but I want to keep it from dropping down if the user clicks in it yet I
still want it to be a tab enabled field. All the fields run through a loop
where they are set to invisible and then only selected ones set back based
on user pref. How can I give them this without the dropdown opening? still
monleying with the property settings

TIA using 10.5.2 7611


Jeremy Lakeman Posted on 2009-09-17 00:04:43.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: how to suppress dropdown list but still wanting retrieve
Date: Wed, 16 Sep 2009 17:04:43 -0700 (PDT)
Organization: http://groups.google.com
Lines: 44
Message-ID: <11e04056-499d-4fa7-9e26-a1de4daab2ec@g1g2000vbr.googlegroups.com>
References: <4ab16e62$3@forums-1-dub>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1253145883 19695 127.0.0.1 (17 Sep 2009 00:04:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 17 Sep 2009 00:04:43 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g1g2000vbr.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!g1g2000vbr.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89956
Article PK: 419150


On Sep 17, 8:01 am, "GW" <gw@gw> wrote:
> Hi folks
>
> I have a grid dw and have a dddw that I need to retrieve a value from an id,
> but I want to keep it from dropping down if the user clicks in it yet I
> still want it to be a tab enabled field. All the fields run through a loop
> where they are set to invisible and then only selected ones set back based
> on user pref. How can I give them this without the dropdown opening? still
> monleying with the property settings
>
> TIA   using 10.5.2  7611

You could always have 2 columns, one with the id and the drop down but
hidden, the other just a text field that the user types into. Then in
itemchanged for the text field you can manually search the dropdown
for the display value and set the id column or reject the value if you
can't find it.

event itemchanged;
string ls_name, ls_id_column, ls_display, ls_data
long ll_row
datawindowchild ldwc

ls_name=dwo.name
if right(ls_name,8)='_display' then
ls_id_column=left(ls_name,len(ls_name)-8)
getchild(ls_id_column, ldwc)
ls_display=describe(ls_id_column+'.displaycolumn')
ls_data=describe(ls_id_column+'.datacolumn')
ll_row = ldwc.find(ls_display+' = "'+f_escape(data)+'"',
1,ldwc.rowcount())
if ll_row >0 then
setitem(row, ls_id_column, ldwc.getitemXXX(ll_row, ls_data))
else
return 1
end if
end if

If you use a standard naming convention for the pair of fields you
would only need to write this process once in your ancestor dw control.


GW Posted on 2009-09-17 15:58:34.0Z
From: "GW" <gw@gw>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4ab16e62$3@forums-1-dub> <11e04056-499d-4fa7-9e26-a1de4daab2ec@g1g2000vbr.googlegroups.com>
Subject: Re: how to suppress dropdown list but still wanting retrieve
Lines: 50
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: <4ab25caa$1@forums-1-dub>
Date: 17 Sep 2009 08:58:34 -0700
X-Trace: forums-1-dub 1253203114 10.22.241.152 (17 Sep 2009 08:58:34 -0700)
X-Original-Trace: 17 Sep 2009 08:58:34 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89959
Article PK: 419146

I don't want them to select at all, but, you're idea of a 2nd column might
be the ticket

thanks

"Jeremy Lakeman" <jeremy.lakeman@gmail.com> wrote in message
news:11e04056-499d-4fa7-9e26-a1de4daab2ec@g1g2000vbr.googlegroups.com...

On Sep 17, 8:01 am, "GW" <gw@gw> wrote:
> Hi folks
>
> I have a grid dw and have a dddw that I need to retrieve a value from an
> id,
> but I want to keep it from dropping down if the user clicks in it yet I
> still want it to be a tab enabled field. All the fields run through a loop
> where they are set to invisible and then only selected ones set back based
> on user pref. How can I give them this without the dropdown opening? still
> monleying with the property settings
>
> TIA using 10.5.2 7611

You could always have 2 columns, one with the id and the drop down but
hidden, the other just a text field that the user types into. Then in
itemchanged for the text field you can manually search the dropdown
for the display value and set the id column or reject the value if you
can't find it.

event itemchanged;
string ls_name, ls_id_column, ls_display, ls_data
long ll_row
datawindowchild ldwc

ls_name=dwo.name
if right(ls_name,8)='_display' then
ls_id_column=left(ls_name,len(ls_name)-8)
getchild(ls_id_column, ldwc)
ls_display=describe(ls_id_column+'.displaycolumn')
ls_data=describe(ls_id_column+'.datacolumn')
ll_row = ldwc.find(ls_display+' = "'+f_escape(data)+'"',
1,ldwc.rowcount())
if ll_row >0 then
setitem(row, ls_id_column, ldwc.getitemXXX(ll_row, ls_data))
else
return 1
end if
end if

If you use a standard naming convention for the pair of fields you
would only need to write this process once in your ancestor dw control.


Chris Pollach Posted on 2009-09-18 19:40:05.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4ab16e62$3@forums-1-dub>
Subject: Re: how to suppress dropdown list but still wanting retrieve
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ab3e215$1@forums-1-dub>
Date: 18 Sep 2009 12:40:05 -0700
X-Trace: forums-1-dub 1253302805 10.22.241.152 (18 Sep 2009 12:40:05 -0700)
X-Original-Trace: 18 Sep 2009 12:40:05 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89966
Article PK: 419154

Hi Greg;

This is easy ...

1) Add a user event to the DC
2) Map it to the "pbm_dwndropdown" message
3) In the new UE - add the script ..
Return -1

That should do it!

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

"GW" <gw@gw> wrote in message news:4ab16e62$3@forums-1-dub...
> Hi folks
>
> I have a grid dw and have a dddw that I need to retrieve a value from an
> id, but I want to keep it from dropping down if the user clicks in it yet
> I still want it to be a tab enabled field. All the fields run through a
> loop where they are set to invisible and then only selected ones set back
> based on user pref. How can I give them this without the dropdown opening?
> still monleying with the property settings
>
> TIA using 10.5.2 7611
>