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.

preventing user from selecting certain rows in a DDDW

10 posts in DataWindow Last posting was on 2009-02-12 18:47:18.0Z
The Other Mike Posted on 2009-02-11 18:32:34.0Z
From: "The Other Mike" <mdunlap@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: preventing user from selecting certain rows in a DDDW
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <499319c2$1@forums-1-dub>
Date: 11 Feb 2009 10:32:34 -0800
X-Trace: forums-1-dub 1234377154 10.22.241.152 (11 Feb 2009 10:32:34 -0800)
X-Original-Trace: 11 Feb 2009 10:32:34 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88770
Article PK: 418025

I have DDDW that I need to display all the prices for a particular product.
Some of the prices are from 2009, 2008, 2007, 2006 etc... Is there a way to
show all the prices but not allow the user from selecting 2007 and 2006?

Thanks
Mike


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-02-11 18:43:18.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <49931c46@forums-1-dub>
Date: 11 Feb 2009 10:43:18 -0800
X-Trace: forums-1-dub 1234377798 10.22.241.152 (11 Feb 2009 10:43:18 -0800)
X-Original-Trace: 11 Feb 2009 10:43:18 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88771
Article PK: 418023

In the itemchanged event, determine if the value selected [contents of the
data agrument] is bogus, and return 2 if it is.
It would be good GUI to have a visual indication of values that are not
acceptable, maybe a color change. I would also Beep(1) to let the user know
the choice was not accepted
This method gets ugly if the user tries to scroll the values with the arrow
keys instead of using the mouse - which is likely if it is a head-down data
entry application.

"The Other Mike" <mdunlap@nospam.com> wrote in message
news:499319c2$1@forums-1-dub...
>I have DDDW that I need to display all the prices for a particular product.
>Some of the prices are from 2009, 2008, 2007, 2006 etc... Is there a way
>to show all the prices but not allow the user from selecting 2007 and 2006?
>
> Thanks
> Mike


The Other Mike Posted on 2009-02-11 20:26:47.0Z
From: "The Other Mike" <mdunlap@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub>
In-Reply-To: <49931c46@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49933487$1@forums-1-dub>
Date: 11 Feb 2009 12:26:47 -0800
X-Trace: forums-1-dub 1234384007 10.22.241.152 (11 Feb 2009 12:26:47 -0800)
X-Original-Trace: 11 Feb 2009 12:26:47 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88772
Article PK: 418024

Ok. So in the DDDW, I want to change the color based on date. Do you know
the correct syntax. I'm stumped.

string smod, sval
long lcolor

datawindowchild dwc
dw_1.getchild("um_amt", dwc)

lcolor = RGB(255,255,255)
sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
sval = dwc.Modify(sMod)

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:49931c46@forums-1-dub...
> In the itemchanged event, determine if the value selected [contents of the
> data agrument] is bogus, and return 2 if it is.
> It would be good GUI to have a visual indication of values that are not
> acceptable, maybe a color change. I would also Beep(1) to let the user
> know the choice was not accepted
> This method gets ugly if the user tries to scroll the values with the
> arrow keys instead of using the mouse - which is likely if it is a
> head-down data entry application.
>
> "The Other Mike" <mdunlap@nospam.com> wrote in message
> news:499319c2$1@forums-1-dub...
>>I have DDDW that I need to display all the prices for a particular
>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>there a way to show all the prices but not allow the user from selecting
>>2007 and 2006?
>>
>> Thanks
>> Mike
>
>


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-02-11 21:19:30.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <499340e2@forums-1-dub>
Date: 11 Feb 2009 13:19:30 -0800
X-Trace: forums-1-dub 1234387170 10.22.241.152 (11 Feb 2009 13:19:30 -0800)
X-Original-Trace: 11 Feb 2009 13:19:30 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88773
Article PK: 418026

DateTime takes a Date as the first argument. Use the PB date literal format
'2007-12-31' rather than 12/31/2007 (which without quotes would be
interpreted as a number resulting from the two divides)

"The Other Mike" <mdunlap@nospam.com> wrote in message
news:49933487$1@forums-1-dub...
> Ok. So in the DDDW, I want to change the color based on date. Do you
> know the correct syntax. I'm stumped.
>
> string smod, sval
> long lcolor
>
> datawindowchild dwc
> dw_1.getchild("um_amt", dwc)
>
> lcolor = RGB(255,255,255)
> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
> sval = dwc.Modify(sMod)
>
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
> news:49931c46@forums-1-dub...
>> In the itemchanged event, determine if the value selected [contents of
>> the data agrument] is bogus, and return 2 if it is.
>> It would be good GUI to have a visual indication of values that are not
>> acceptable, maybe a color change. I would also Beep(1) to let the user
>> know the choice was not accepted
>> This method gets ugly if the user tries to scroll the values with the
>> arrow keys instead of using the mouse - which is likely if it is a
>> head-down data entry application.
>>
>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>> news:499319c2$1@forums-1-dub...
>>>I have DDDW that I need to display all the prices for a particular
>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>there a way to show all the prices but not allow the user from selecting
>>>2007 and 2006?
>>>
>>> Thanks
>>> Mike
>>
>>
>


Chris Pollach Posted on 2009-02-12 12:26:48.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 54
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49941588$1@forums-1-dub>
Date: 12 Feb 2009 04:26:48 -0800
X-Trace: forums-1-dub 1234441608 10.22.241.152 (12 Feb 2009 04:26:48 -0800)
X-Original-Trace: 12 Feb 2009 04:26:48 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88777
Article PK: 418031

Hi Mike;

That would be the hard way.

I would use the DDDW itself. Just assign an Expression on the detail band
to change the colour of the row if its not the current year.

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

"The Other Mike" <mdunlap@nospam.com> wrote in message
news:49933487$1@forums-1-dub...
> Ok. So in the DDDW, I want to change the color based on date. Do you
> know the correct syntax. I'm stumped.
>
> string smod, sval
> long lcolor
>
> datawindowchild dwc
> dw_1.getchild("um_amt", dwc)
>
> lcolor = RGB(255,255,255)
> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
> sval = dwc.Modify(sMod)
>
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
> news:49931c46@forums-1-dub...
>> In the itemchanged event, determine if the value selected [contents of
>> the data agrument] is bogus, and return 2 if it is.
>> It would be good GUI to have a visual indication of values that are not
>> acceptable, maybe a color change. I would also Beep(1) to let the user
>> know the choice was not accepted
>> This method gets ugly if the user tries to scroll the values with the
>> arrow keys instead of using the mouse - which is likely if it is a
>> head-down data entry application.
>>
>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>> news:499319c2$1@forums-1-dub...
>>>I have DDDW that I need to display all the prices for a particular
>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>there a way to show all the prices but not allow the user from selecting
>>>2007 and 2006?
>>>
>>> Thanks
>>> Mike
>>
>>
>


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-02-12 13:51:06.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub> <49941588$1@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
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: <4994294a@forums-1-dub>
Date: 12 Feb 2009 05:51:06 -0800
X-Trace: forums-1-dub 1234446666 10.22.241.152 (12 Feb 2009 05:51:06 -0800)
X-Original-Trace: 12 Feb 2009 05:51:06 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88778
Article PK: 418030

If current year is the criterion, that would work. If it's something in the
main DW or something else from the window (user choice of range?), the DDDW
can't see it.

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:49941588$1@forums-1-dub...
> Hi Mike;
>
> That would be the hard way.
>
> I would use the DDDW itself. Just assign an Expression on the detail band
> to change the colour of the row if its not the current year.
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> "The Other Mike" <mdunlap@nospam.com> wrote in message
> news:49933487$1@forums-1-dub...
>> Ok. So in the DDDW, I want to change the color based on date. Do you
>> know the correct syntax. I'm stumped.
>>
>> string smod, sval
>> long lcolor
>>
>> datawindowchild dwc
>> dw_1.getchild("um_amt", dwc)
>>
>> lcolor = RGB(255,255,255)
>> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
>> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
>> sval = dwc.Modify(sMod)
>>
>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
>> news:49931c46@forums-1-dub...
>>> In the itemchanged event, determine if the value selected [contents of
>>> the data agrument] is bogus, and return 2 if it is.
>>> It would be good GUI to have a visual indication of values that are not
>>> acceptable, maybe a color change. I would also Beep(1) to let the user
>>> know the choice was not accepted
>>> This method gets ugly if the user tries to scroll the values with the
>>> arrow keys instead of using the mouse - which is likely if it is a
>>> head-down data entry application.
>>>
>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>> news:499319c2$1@forums-1-dub...
>>>>I have DDDW that I need to display all the prices for a particular
>>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>>there a way to show all the prices but not allow the user from selecting
>>>>2007 and 2006?
>>>>
>>>> Thanks
>>>> Mike
>>>
>>>
>>
>
>


Chris Pollach Posted on 2009-02-12 15:16:53.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub> <49941588$1@forums-1-dub> <4994294a@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 80
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49943d65$1@forums-1-dub>
Date: 12 Feb 2009 07:16:53 -0800
X-Trace: forums-1-dub 1234451813 10.22.241.152 (12 Feb 2009 07:16:53 -0800)
X-Original-Trace: 12 Feb 2009 07:16:53 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88781
Article PK: 418033

No that would still be the hard way to do it IMHO.

Just add a retrieval argument to the DDDW. Change the parent DW's
AutoRetieve to FALSE. Then do a GetChild on the DDDW and in the Retrieve ( )
method for the child DWO pass the value for the RA that the DDDW needs to
make its expression work.

Note: Mike - you can use RA's in your DW expressions if you did not know
that.

HTH

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:4994294a@forums-1-dub...
> If current year is the criterion, that would work. If it's something in
> the main DW or something else from the window (user choice of range?), the
> DDDW can't see it.
>
> "Chris Pollach" <cpollach@travel-net.com> wrote in message
> news:49941588$1@forums-1-dub...
>> Hi Mike;
>>
>> That would be the hard way.
>>
>> I would use the DDDW itself. Just assign an Expression on the detail band
>> to change the colour of the row if its not the current year.
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>> news:49933487$1@forums-1-dub...
>>> Ok. So in the DDDW, I want to change the color based on date. Do you
>>> know the correct syntax. I'm stumped.
>>>
>>> string smod, sval
>>> long lcolor
>>>
>>> datawindowchild dwc
>>> dw_1.getchild("um_amt", dwc)
>>>
>>> lcolor = RGB(255,255,255)
>>> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
>>> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
>>> sval = dwc.Modify(sMod)
>>>
>>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
>>> news:49931c46@forums-1-dub...
>>>> In the itemchanged event, determine if the value selected [contents of
>>>> the data agrument] is bogus, and return 2 if it is.
>>>> It would be good GUI to have a visual indication of values that are not
>>>> acceptable, maybe a color change. I would also Beep(1) to let the user
>>>> know the choice was not accepted
>>>> This method gets ugly if the user tries to scroll the values with the
>>>> arrow keys instead of using the mouse - which is likely if it is a
>>>> head-down data entry application.
>>>>
>>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>>> news:499319c2$1@forums-1-dub...
>>>>>I have DDDW that I need to display all the prices for a particular
>>>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>>>there a way to show all the prices but not allow the user from
>>>>>selecting 2007 and 2006?
>>>>>
>>>>> Thanks
>>>>> Mike
>>>>
>>>>
>>>
>>
>>
>
>


The Other Mike Posted on 2009-02-12 17:08:01.0Z
From: "The Other Mike" <mdunlap@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub> <49941588$1@forums-1-dub> <4994294a@forums-1-dub> <49943d65$1@forums-1-dub>
In-Reply-To: <49943d65$1@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 89
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49945771@forums-1-dub>
Date: 12 Feb 2009 09:08:01 -0800
X-Trace: forums-1-dub 1234458481 10.22.241.152 (12 Feb 2009 09:08:01 -0800)
X-Original-Trace: 12 Feb 2009 09:08:01 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88783
Article PK: 418037

Thanks

I got it to work in the development environment where I just run the DW and
DDDW but it's not working when I run the application. It's leaving all the
rows gray. But I'm on the right path.

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:49943d65$1@forums-1-dub...
>
> No that would still be the hard way to do it IMHO.
>
> Just add a retrieval argument to the DDDW. Change the parent DW's
> AutoRetieve to FALSE. Then do a GetChild on the DDDW and in the Retrieve
> ( ) method for the child DWO pass the value for the RA that the DDDW needs
> to make its expression work.
>
> Note: Mike - you can use RA's in your DW expressions if you did not know
> that.
>
> HTH
>
>
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
> news:4994294a@forums-1-dub...
>> If current year is the criterion, that would work. If it's something in
>> the main DW or something else from the window (user choice of range?),
>> the DDDW can't see it.
>>
>> "Chris Pollach" <cpollach@travel-net.com> wrote in message
>> news:49941588$1@forums-1-dub...
>>> Hi Mike;
>>>
>>> That would be the hard way.
>>>
>>> I would use the DDDW itself. Just assign an Expression on the detail
>>> band to change the colour of the row if its not the current year.
>>>
>>> --
>>> Regards ... Chris
>>> ISUG - NA RUG Director
>>> http://chrispollach.pbdjmagazine.com
>>>
>>>
>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>> news:49933487$1@forums-1-dub...
>>>> Ok. So in the DDDW, I want to change the color based on date. Do you
>>>> know the correct syntax. I'm stumped.
>>>>
>>>> string smod, sval
>>>> long lcolor
>>>>
>>>> datawindowchild dwc
>>>> dw_1.getchild("um_amt", dwc)
>>>>
>>>> lcolor = RGB(255,255,255)
>>>> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
>>>> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
>>>> sval = dwc.Modify(sMod)
>>>>
>>>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in
>>>> message news:49931c46@forums-1-dub...
>>>>> In the itemchanged event, determine if the value selected [contents of
>>>>> the data agrument] is bogus, and return 2 if it is.
>>>>> It would be good GUI to have a visual indication of values that are
>>>>> not acceptable, maybe a color change. I would also Beep(1) to let the
>>>>> user know the choice was not accepted
>>>>> This method gets ugly if the user tries to scroll the values with the
>>>>> arrow keys instead of using the mouse - which is likely if it is a
>>>>> head-down data entry application.
>>>>>
>>>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>>>> news:499319c2$1@forums-1-dub...
>>>>>>I have DDDW that I need to display all the prices for a particular
>>>>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>>>>there a way to show all the prices but not allow the user from
>>>>>>selecting 2007 and 2006?
>>>>>>
>>>>>> Thanks
>>>>>> Mike
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>
>


Chris Pollach Posted on 2009-02-12 18:47:18.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub> <49941588$1@forums-1-dub> <4994294a@forums-1-dub> <49943d65$1@forums-1-dub> <49945771@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 98
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; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49946eb6$1@forums-1-dub>
Date: 12 Feb 2009 10:47:18 -0800
X-Trace: forums-1-dub 1234464438 10.22.241.152 (12 Feb 2009 10:47:18 -0800)
X-Original-Trace: 12 Feb 2009 10:47:18 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88785
Article PK: 418039

Great ... and good luck. Post us another question if you get stuck though.
Have a great day!

"The Other Mike" <mdunlap@nospam.com> wrote in message
news:49945771@forums-1-dub...
> Thanks
>
> I got it to work in the development environment where I just run the DW
> and DDDW but it's not working when I run the application. It's leaving
> all the rows gray. But I'm on the right path.
>
> "Chris Pollach" <cpollach@travel-net.com> wrote in message
> news:49943d65$1@forums-1-dub...
>>
>> No that would still be the hard way to do it IMHO.
>>
>> Just add a retrieval argument to the DDDW. Change the parent DW's
>> AutoRetieve to FALSE. Then do a GetChild on the DDDW and in the Retrieve
>> ( ) method for the child DWO pass the value for the RA that the DDDW
>> needs to make its expression work.
>>
>> Note: Mike - you can use RA's in your DW expressions if you did not know
>> that.
>>
>> HTH
>>
>>
>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
>> news:4994294a@forums-1-dub...
>>> If current year is the criterion, that would work. If it's something in
>>> the main DW or something else from the window (user choice of range?),
>>> the DDDW can't see it.
>>>
>>> "Chris Pollach" <cpollach@travel-net.com> wrote in message
>>> news:49941588$1@forums-1-dub...
>>>> Hi Mike;
>>>>
>>>> That would be the hard way.
>>>>
>>>> I would use the DDDW itself. Just assign an Expression on the detail
>>>> band to change the colour of the row if its not the current year.
>>>>
>>>> --
>>>> Regards ... Chris
>>>> ISUG - NA RUG Director
>>>> http://chrispollach.pbdjmagazine.com
>>>>
>>>>
>>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>>> news:49933487$1@forums-1-dub...
>>>>> Ok. So in the DDDW, I want to change the color based on date. Do you
>>>>> know the correct syntax. I'm stumped.
>>>>>
>>>>> string smod, sval
>>>>> long lcolor
>>>>>
>>>>> datawindowchild dwc
>>>>> dw_1.getchild("um_amt", dwc)
>>>>>
>>>>> lcolor = RGB(255,255,255)
>>>>> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
>>>>> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
>>>>> sval = dwc.Modify(sMod)
>>>>>
>>>>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in
>>>>> message news:49931c46@forums-1-dub...
>>>>>> In the itemchanged event, determine if the value selected [contents
>>>>>> of the data agrument] is bogus, and return 2 if it is.
>>>>>> It would be good GUI to have a visual indication of values that are
>>>>>> not acceptable, maybe a color change. I would also Beep(1) to let the
>>>>>> user know the choice was not accepted
>>>>>> This method gets ugly if the user tries to scroll the values with the
>>>>>> arrow keys instead of using the mouse - which is likely if it is a
>>>>>> head-down data entry application.
>>>>>>
>>>>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>>>>> news:499319c2$1@forums-1-dub...
>>>>>>>I have DDDW that I need to display all the prices for a particular
>>>>>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc...
>>>>>>>Is there a way to show all the prices but not allow the user from
>>>>>>>selecting 2007 and 2006?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Mike
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>


The Other Mike Posted on 2009-02-12 15:01:39.0Z
From: "The Other Mike" <mdunlap@nospam.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <499319c2$1@forums-1-dub> <49931c46@forums-1-dub> <49933487$1@forums-1-dub> <49941588$1@forums-1-dub> <4994294a@forums-1-dub>
In-Reply-To: <4994294a@forums-1-dub>
Subject: Re: preventing user from selecting certain rows in a DDDW
Lines: 70
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <499439d3$1@forums-1-dub>
Date: 12 Feb 2009 07:01:39 -0800
X-Trace: forums-1-dub 1234450899 10.22.241.152 (12 Feb 2009 07:01:39 -0800)
X-Original-Trace: 12 Feb 2009 07:01:39 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88779
Article PK: 418034

I can get it to work in the DDDW of the detail band.

I can't come up with the right syntax to do it in the powerscript.

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:4994294a@forums-1-dub...
> If current year is the criterion, that would work. If it's something in
> the main DW or something else from the window (user choice of range?), the
> DDDW can't see it.
>
> "Chris Pollach" <cpollach@travel-net.com> wrote in message
> news:49941588$1@forums-1-dub...
>> Hi Mike;
>>
>> That would be the hard way.
>>
>> I would use the DDDW itself. Just assign an Expression on the detail band
>> to change the colour of the row if its not the current year.
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>> news:49933487$1@forums-1-dub...
>>> Ok. So in the DDDW, I want to change the color based on date. Do you
>>> know the correct syntax. I'm stumped.
>>>
>>> string smod, sval
>>> long lcolor
>>>
>>> datawindowchild dwc
>>> dw_1.getchild("um_amt", dwc)
>>>
>>> lcolor = RGB(255,255,255)
>>> sMod = "datatwindow.detail.color='"+String(lColor)+" ~t
>>> if(valid_thru_dt>=datetime(12/31/2007),RGB(255,255,255),RGB(192,192,192))'"
>>> sval = dwc.Modify(sMod)
>>>
>>> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
>>> news:49931c46@forums-1-dub...
>>>> In the itemchanged event, determine if the value selected [contents of
>>>> the data agrument] is bogus, and return 2 if it is.
>>>> It would be good GUI to have a visual indication of values that are not
>>>> acceptable, maybe a color change. I would also Beep(1) to let the user
>>>> know the choice was not accepted
>>>> This method gets ugly if the user tries to scroll the values with the
>>>> arrow keys instead of using the mouse - which is likely if it is a
>>>> head-down data entry application.
>>>>
>>>> "The Other Mike" <mdunlap@nospam.com> wrote in message
>>>> news:499319c2$1@forums-1-dub...
>>>>>I have DDDW that I need to display all the prices for a particular
>>>>>product. Some of the prices are from 2009, 2008, 2007, 2006 etc... Is
>>>>>there a way to show all the prices but not allow the user from
>>>>>selecting 2007 and 2006?
>>>>>
>>>>> Thanks
>>>>> Mike
>>>>
>>>>
>>>
>>
>>
>
>