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.

Delete rows from a datawindow

4 posts in Objects Last posting was on 2008-05-16 14:24:47.0Z
res Posted on 2008-05-14 10:42:36.0Z
Sender: 3ab8.482abe66.1804289383@sybase.com
From: res
Newsgroups: sybase.public.powerbuilder.objects
Subject: Delete rows from a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <482ac21c.3b1f.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 May 2008 03:42:36 -0700
X-Trace: forums-1-dub 1210761756 10.22.241.41 (14 May 2008 03:42:36 -0700)
X-Original-Trace: 14 May 2008 03:42:36 -0700, 10.22.241.41
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9688
Article PK: 736824

Hi all,

I have a header & detail datwindow. bsed on the qty field
in the eder level, the detail level should insert that many
number of rows.
ie if i add 10 in qty the detail dw should contin 10 rows,
and if i modify the number from 10 to 6 the detail should
have only 6 rows. how can i code in the item changed event
of the qty field to achieve this ? pl. help.

Thanks
res


Roland Smith [TeamSybase] Posted on 2008-05-14 12:56:02.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.objects
References: <482ac21c.3b1f.1681692777@sybase.com>
Subject: Re: Delete rows from a datawindow
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <482ae162$1@forums-1-dub>
Date: 14 May 2008 05:56:02 -0700
X-Trace: forums-1-dub 1210769762 10.22.241.152 (14 May 2008 05:56:02 -0700)
X-Original-Trace: 14 May 2008 05:56:02 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9689
Article PK: 736833

Long ll_qty, ll_row, ll_max

ll_qty = Long(data)

for ll_row = 1 to ll_qty
dw_detail.InsertRow(0)
next

ll_max = dw_detail.RowCount()
for ll_row = ll_max to ll_qty+1 step -1
dw_detail.DeleteRow(ll_row)
next

<res> wrote in message news:482ac21c.3b1f.1681692777@sybase.com...
> Hi all,
>
> I have a header & detail datwindow. bsed on the qty field
> in the eder level, the detail level should insert that many
> number of rows.
> ie if i add 10 in qty the detail dw should contin 10 rows,
> and if i modify the number from 10 to 6 the detail should
> have only 6 rows. how can i code in the item changed event
> of the qty field to achieve this ? pl. help.
>
> Thanks
> res


res Posted on 2008-05-16 02:37:04.0Z
Sender: fed.482cf18a.1804289383@sybase.com
From: res
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Delete rows from a datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <482cf350.100d.1681692777@sybase.com>
References: <482ae162$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 May 2008 19:37:04 -0700
X-Trace: forums-1-dub 1210905424 10.22.241.41 (15 May 2008 19:37:04 -0700)
X-Original-Trace: 15 May 2008 19:37:04 -0700, 10.22.241.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9692
Article PK: 736843

Dear
Thanks for the response. let me explain my situation a bit
more.
i have 3 qty fields for 3 different products, ie qty_1,
qty_2, qty_3. similarly in dtl dw there will be as many
number of rows will be added for each product as the qty
field changes.
so in qty_1 i enter 1 - adds 1 row in dtl dw for product 1.
then i enter qty_2 as 5 for product 2. this should add 5
rows in dtl against product 2.
these insertions are ok, but if i modify any of the qty of
any product while in insert mode itself,then that product's
dtl rows should be added/deleted accordingly to match the
qty requested.
pl. help.

Thanks
res

> Long ll_qty, ll_row, ll_max
>
> ll_qty = Long(data)
>
> for ll_row = 1 to ll_qty
> dw_detail.InsertRow(0)
> next
>
> ll_max = dw_detail.RowCount()
> for ll_row = ll_max to ll_qty+1 step -1
> dw_detail.DeleteRow(ll_row)
> next
>
> <res> wrote in message
> > news:482ac21c.3b1f.1681692777@sybase.com... Hi all,
> >
> > I have a header & detail datwindow. bsed on the qty
> > field in the eder level, the detail level should insert
> > that many number of rows.
> > ie if i add 10 in qty the detail dw should contin 10
> > rows, and if i modify the number from 10 to 6 the detail
> > should have only 6 rows. how can i code in the item
> > changed event of the qty field to achieve this ? pl.
> help. >
> > Thanks
> > res
>
>