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.

Setrow failed some all columns are proctected

2 posts in Objects Last posting was on 2003-02-27 18:54:55.0Z
mabel Posted on 2003-02-27 02:29:25.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: mabel
Date: Wed, 26 Feb 2003 21:29:25 -0500
Subject: Setrow failed some all columns are proctected
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_5ED6B528DBC0B172000DAE0485256CDA.000DAE3985256CDA@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7215
Article PK: 734509

I've created a datawindow with a column's tab order = 10 for some rows and
tab order = 0 for other rows, when i try to get a row in the datawindow
rbuttondown event. The set row return -1 and new current row = 0. But when
i add scrolltoRow after setrow, it can get the new current row although
setrow still return -1.
Do you know why?


"John Olson [Team Sybase]" <john.olson Posted on 2003-02-27 18:54:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Subject: Re: Setrow failed some all columns are proctected
Date: Thu, 27 Feb 2003 13:54:55 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: tom.scn.spawar.navy.mil 192.171.8.14
Message-ID: <364_jp0fBUp3CHA.299@forums.sybase.com>
References: <364_5ED6B528DBC0B172000DAE0485256CDA.000DAE3985256CDA@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7216
Article PK: 734505

SetRow/GetRow have problems when all columns all rows are protected. The
protect feature was designed to mimick protect in Excel, which always sets
focus to the first column that is not protected, even if it is not on the
first row. For DWs that have all cells protected there is no defined current
row. So if you execute a SetRow() it'll go to that row then search all rows
after it looking for the first unprotected cell. If it doesn't find one then
you end up in a weird state. Therefore you can't rely on GetRow either. The
way I've dealt with this situation is to always have one cell that is not
protected. Most of the time I set a column to "displayonly" so that my
setrows and getrows work.

Regards,
John
Team Sybase

<mabel> wrote in message
news:5ED6B528DBC0B172000DAE0485256CDA.000DAE3985256CDA@webforums...
> I've created a datawindow with a column's tab order = 10 for some rows and
> tab order = 0 for other rows, when i try to get a row in the datawindow
> rbuttondown event. The set row return -1 and new current row = 0. But when
> i add scrolltoRow after setrow, it can get the new current row although
> setrow still return -1.
> Do you know why?