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.

Problem with GetSelectedRow(0) when deleting rows

4 posts in DataWindow Last posting was on 2009-05-12 07:53:22.0Z
Oletros Posted on 2009-05-11 14:32:34.0Z
From: Oletros <oletros@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Problem with GetSelectedRow(0) when deleting rows
Date: Mon, 11 May 2009 07:32:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 11
Message-ID: <dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com>
NNTP-Posting-Host: 217.126.123.61
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1242052355 23063 127.0.0.1 (11 May 2009 14:32:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 11 May 2009 14:32:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r13g2000vbr.googlegroups.com; posting-host=217.126.123.61; posting-account=14vfHwkAAAA-PzNUfGyilui9qHRS-xn1
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 (.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!r13g2000vbr.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89258
Article PK: 418510

I'm deleting a series of selected rows in one datawindow but I have
encountered this problem:

When I have 2 rows and only one selected it deletes the 2 rows because
when I deleted the second and I try to find the next selected
(ll_row=GetSelectedRow(0)) it returns 1

Can someone help me?

Thanks and best regards,
Iñaki


R. Pods Posted on 2009-05-11 15:28:17.0Z
From: "R. Pods" <r.pods@gmx.net>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Problem with GetSelectedRow(0) when deleting rows
References: <dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com>
In-Reply-To: <dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a084411$1@forums-1-dub>
Date: 11 May 2009 08:28:17 -0700
X-Trace: forums-1-dub 1242055697 10.22.241.152 (11 May 2009 08:28:17 -0700)
X-Original-Trace: 11 May 2009 08:28:17 -0700, vip152.sybase.com
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89260
Article PK: 418511

When deleting rows I sometimes loop bottom up: start with the last row
to delete and work up unto the first. So I won't have to bother with
changing row numbers for rows after a deleted row.

But that may not be related to your problem.

Reimer

Oletros wrote:
> I'm deleting a series of selected rows in one datawindow but I have
> encountered this problem:
>
> When I have 2 rows and only one selected it deletes the 2 rows because
> when I deleted the second and I try to find the next selected
> (ll_row=GetSelectedRow(0)) it returns 1
>
> Can someone help me?
>
> Thanks and best regards,
> Iñaki


shashi Posted on 2009-05-12 07:53:22.0Z
From: shashi <gogia7@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Problem with GetSelectedRow(0) when deleting rows
Date: Tue, 12 May 2009 00:53:22 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <50f9d085-e519-4446-92ff-16f97effe433@n21g2000vba.googlegroups.com>
References: <dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com> <4a084411$1@forums-1-dub>
NNTP-Posting-Host: 216.59.203.2
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1242114802 1162 127.0.0.1 (12 May 2009 07:53:22 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 12 May 2009 07:53:22 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: n21g2000vba.googlegroups.com; posting-host=216.59.203.2; posting-account=mY9CiAoAAABxoNLAQxxv-hZcQZtLM6pE
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!News-Peer-Europe!news-peer-europe.sprintlink.net!news.stupi.se!news.glorb.com!news2.glorb.com!news.glorb.com!postnews.google.com!n21g2000vba.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89262
Article PK: 418514


On May 11, 8:28 pm, "R. Pods" <r.p...@gmx.net> wrote:
> When deleting rows I sometimes loop bottom up: start with the last row
> to delete and work up unto the first. So I won't have to bother with
> changing row numbers for rows after a deleted row.
>
> But that may not be related to your problem.
>
> Reimer
>
> Oletros wrote:
> > I'm deleting a series of selected rows in one datawindow but I have
> > encountered this problem:
>
> > When I have 2 rows and only one selected it deletes the 2 rows because
> > when I deleted the second and I try to find the next selected
> > (ll_row=GetSelectedRow(0)) it returns 1
>
> > Can someone help me?
>
> > Thanks and best regards,
> > Iñaki

Actually I think the answer by Pods is correct -only it is not
sometimes. I do that path always after learning of this problem the
hard way my code is something like
Long lRows, idx
lRows = dw_1.rowcount()
For idx = lRows to 1
dw_1.deleterow(1)
Next

// if a selected group needs to be deleted do a filter first


Chris Pollach Posted on 2009-05-11 14:59:07.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com>
Subject: Re: Problem with GetSelectedRow(0) when deleting rows
Lines: 26
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; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a083d3b$1@forums-1-dub>
Date: 11 May 2009 07:59:07 -0700
X-Trace: forums-1-dub 1242053947 10.22.241.152 (11 May 2009 07:59:07 -0700)
X-Original-Trace: 11 May 2009 07:59:07 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89259
Article PK: 418513

Hi Iñaki;

It sounds like you have some code somewhere that issues a SelectRow ( )
command after the 1st row is deleted.

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


"Oletros" <oletros@gmail.com> wrote in message
news:dc81e58a-c745-4418-8a75-d9a842ce90ab@r13g2000vbr.googlegroups.com...
I'm deleting a series of selected rows in one datawindow but I have
encountered this problem:

When I have 2 rows and only one selected it deletes the 2 rows because
when I deleted the second and I try to find the next selected
(ll_row=GetSelectedRow(0)) it returns 1

Can someone help me?

Thanks and best regards,
Iñaki