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.

Getting data from columns

8 posts in DataWindow .NET Last posting was on 2004-09-27 17:45:40.0Z
Tony Posted on 2004-09-27 13:05:13.0Z
Sender: 7ca4.41580e9d.1804289383@sybase.com
From: Tony
Newsgroups: sybase.public.datawindow.net
Subject: Getting data from columns
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41581009.7cbf.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Sep 2004 06:05:13 -0700
X-Trace: forums-1-dub 1096290313 10.22.241.41 (27 Sep 2004 06:05:13 -0700)
X-Original-Trace: 27 Sep 2004 06:05:13 -0700, 10.22.241.41
Lines: 4
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:446
Article PK: 124875

If I have a datawindow with two columns the first a column
of edits, the second a column of checkboxes – How do I
programmatically get the values for each of the controls in
these two columns.


dfish Posted on 2004-09-27 14:01:59.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Getting data from columns
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <41581cbe.73215257@forums.sybase.com>
References: <41581009.7cbf.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-070.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-070.sybase.com
Date: 27 Sep 2004 07:01:59 -0700
X-Trace: forums-1-dub 1096293719 10.22.120.70 (27 Sep 2004 07:01:59 -0700)
X-Original-Trace: 27 Sep 2004 07:01:59 -0700, vpn-dub-070.sybase.com
Lines: 19
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:447
Article PK: 124873

You can use the GetItemX functions. They will return the data value
for the column.

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 27 Sep 2004 06:05:13 -0700, Tony wrote:

>If I have a datawindow with two columns the first a column
>of edits, the second a column of checkboxes =96 How do I
>programmatically get the values for each of the controls in
>these two columns.


dfish Posted on 2004-09-27 15:39:08.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Getting data from columns
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <41582ecd.77837324@forums.sybase.com>
References: <41581cbe.73215257@forums.sybase.com> <41582038.7e81.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-070.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-070.sybase.com
Date: 27 Sep 2004 08:39:08 -0700
X-Trace: forums-1-dub 1096299548 10.22.120.70 (27 Sep 2004 08:39:08 -0700)
X-Original-Trace: 27 Sep 2004 08:39:08 -0700, vpn-dub-070.sybase.com
Lines: 62
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:449
Article PK: 124876

Rows in a column? Do you mean you want to get the display value for a
column if you are using a code table or a drop down DataWindow? Or are
you trying to find out how many rows are in a drop down DataWindow?

If you want to get the display value for a column (as opposed to the
data value which the GetItemX method will return) you need to use the
Describe and Evaluate methods. Here's an example:

Dim ls_state As String
Dim ls_row As String

ls_row = dw_main.CurrentRow

ls_state=dw_main.Describe("evaluate('lookupdisplay(employee_state)',"+ls_row+")")

What this Describe method call is doing is getting the display value
for the state column. This will return California if the data value is
CA, etc.

If you want the number of rows in a drop Down DataWindow you need to
get a handle to the ChildDataWindow (see the help for more information
on Child DataWindows) and then use the RowCount property.

If neither of these is what you are looking for then never mind. <g>

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 27 Sep 2004 07:14:16 -0700, Tony wrote:

>Ah - that helps !!
>so how do I know how many rows are in a column?
>
>Thanks
>
>
>> You can use the GetItemX functions. They will return the
>> data value for the column.
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 27 Sep 2004 06:05:13 -0700, Tony wrote:
>>
>> >If I have a datawindow with two columns the first a
>> column >of edits, the second a column of checkboxes =96
>> How do I >programmatically get the values for each of the
>> controls in >these two columns.
>>


dfish Posted on 2004-09-27 17:41:48.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Getting data from columns
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <41584dcf.85774957@forums.sybase.com>
References: <41582ecd.77837324@forums.sybase.com> <41584596.16f9.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-070.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-070.sybase.com
Date: 27 Sep 2004 10:41:48 -0700
X-Trace: forums-1-dub 1096306908 10.22.120.70 (27 Sep 2004 10:41:48 -0700)
X-Original-Trace: 27 Sep 2004 10:41:48 -0700, vpn-dub-070.sybase.com
Lines: 99
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:455
Article PK: 124881

Ok, I think I understand what you want to do. You should use the
Describe method to get the first row currently visible in the
DataWindow.

Dim ls_row As String
ls_row = dw_main.Describe("DataWindow.FirstRowOnPage")

Describe returns a string so you'll need to cast it to a numeric
value. With that value, if you know the number of rows that can be
visible in your DataWindow, you can capture any information from any
of the visible rows.

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 27 Sep 2004 09:53:47 -0700, Tony wrote:

>The DataWindow displays 5 rows from a table of 600 (say). I
>want to get those rows that are currently displayed on the
>screen.
>GetItemString takes a row number, but I need to know which
>row or rows are displayed in order to extract the correct
>value.
>
>
>> Rows in a column? Do you mean you want to get the display
>> value for a column if you are using a code table or a drop
>> down DataWindow? Or are you trying to find out how many
>> rows are in a drop down DataWindow?
>>
>> If you want to get the display value for a column (as
>> opposed to the data value which the GetItemX method will
>> return) you need to use the Describe and Evaluate methods.
>> Here's an example:
>>
>> Dim ls_state As String
>> Dim ls_row As String
>>
>> ls_row = dw_main.CurrentRow
>>
>> ls_state=dw_main.Describe("evaluate('lookupdisplay(employe
>> e_state)',"+ls_row+")")
>>
>> What this Describe method call is doing is getting the
>> display value for the state column. This will return
>> California if the data value is CA, etc.
>>
>> If you want the number of rows in a drop Down DataWindow
>> you need to get a handle to the ChildDataWindow (see the
>> help for more information on Child DataWindows) and then
>> use the RowCount property.
>>
>> If neither of these is what you are looking for then never
>> mind. <g>
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 27 Sep 2004 07:14:16 -0700, Tony wrote:
>>
>> >Ah - that helps !!
>> >so how do I know how many rows are in a column?
>> >
>> >Thanks
>> >
>> >
>> >> You can use the GetItemX functions. They will return
>> the >> data value for the column.
>> >>
>> >> Regards,
>> >> Dave Fish
>> >> Sybase
>> >>
>> >> TeamSybase blogs: http://www.teamsybase.net/blogs
>> >>
>> >> DataWindow.NET code examples available on CodeXchange:
>> >> http://datawindownet.codexchange.sybase.com
>> >>
>> >> On 27 Sep 2004 06:05:13 -0700, Tony wrote:
>> >>
>> >> >If I have a datawindow with two columns the first a
>> >> column >of edits, the second a column of checkboxes =96
>> >> How do I >programmatically get the values for each of
>> the >> controls in >these two columns.
>> >>
>>


Tony Posted on 2004-09-27 16:52:30.0Z
Sender: 16cd.41584251.1804289383@sybase.com
From: Tony
Newsgroups: sybase.public.datawindow.net
Subject: Re: Getting data from columns
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4158454a.16f1.1681692777@sybase.com>
References: <41582ecd.77837324@forums.sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 27 Sep 2004 09:52:26 -0700, 10.22.241.42
Lines: 75
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 27 Sep 2004 09:52:27 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 27 Sep 2004 09:52:30 -0700
X-Trace: forums-1-dub 1096303950 10.22.108.75 (27 Sep 2004 09:52:30 -0700)
X-Original-Trace: 27 Sep 2004 09:52:30 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:451
Article PK: 124883

The DataWindow displays 5 rows from a table of 600 (say). I
want to get those rows that are currently displayed on the
screen.
GetItemString takes a row number, but I need to know which
row or rows are displayed in order to extract the correct
value.

> Rows in a column? Do you mean you want to get the display
> value for a column if you are using a code table or a drop
> down DataWindow? Or are you trying to find out how many
> rows are in a drop down DataWindow?
>
> If you want to get the display value for a column (as
> opposed to the data value which the GetItemX method will
> return) you need to use the Describe and Evaluate methods.
> Here's an example:
>
> Dim ls_state As String
> Dim ls_row As String
>
> ls_row = dw_main.CurrentRow
>
> ls_state=dw_main.Describe("evaluate('lookupdisplay(employe
> e_state)',"+ls_row+")")
>
> What this Describe method call is doing is getting the
> display value for the state column. This will return
> California if the data value is CA, etc.
>
> If you want the number of rows in a drop Down DataWindow
> you need to get a handle to the ChildDataWindow (see the
> help for more information on Child DataWindows) and then
> use the RowCount property.
>
> If neither of these is what you are looking for then never
> mind. <g>
>
> Regards,
> Dave Fish
> Sybase
>
> TeamSybase blogs: http://www.teamsybase.net/blogs
>
> DataWindow.NET code examples available on CodeXchange:
> http://datawindownet.codexchange.sybase.com
>
> On 27 Sep 2004 07:14:16 -0700, Tony wrote:
>
> >Ah - that helps !!
> >so how do I know how many rows are in a column?
> >
> >Thanks
> >
> >
> >> You can use the GetItemX functions. They will return
> the >> data value for the column.
> >>
> >> Regards,
> >> Dave Fish
> >> Sybase
> >>
> >> TeamSybase blogs: http://www.teamsybase.net/blogs
> >>
> >> DataWindow.NET code examples available on CodeXchange:
> >> http://datawindownet.codexchange.sybase.com
> >>
> >> On 27 Sep 2004 06:05:13 -0700, Tony wrote:
> >>
> >> >If I have a datawindow with two columns the first a
> >> column >of edits, the second a column of checkboxes =96
> >> How do I >programmatically get the values for each of
> the >> controls in >these two columns.
> >>
>


Jim O'Neil [Sybase] Posted on 2004-09-27 17:45:40.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Getting data from columns
Message-ID: <m7kgl0t01aj92o098jq6o5ub7vm5147nps@4ax.com>
References: <41582ecd.77837324@forums.sybase.com> <4158454a.16f1.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: joneilw2k.sybase.com
X-Original-Trace: 27 Sep 2004 10:45:36 -0700, joneilw2k.sybase.com
Lines: 94
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 27 Sep 2004 10:45:37 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 27 Sep 2004 10:45:40 -0700
X-Trace: forums-1-dub 1096307140 10.22.108.75 (27 Sep 2004 10:45:40 -0700)
X-Original-Trace: 27 Sep 2004 10:45:40 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:456
Article PK: 124882

Usually, you would call GetItemXXX in response to some user action,
like a mouse click, or you'd call it on whatever row was last touched.
In those cases, the ObjectAtPointer structure or the CurrentRow
property would contain the row argument you are looking for.

If I take you literally though, and what you want is exactly the
numbers of the row that currently are displayed, you can get the first
and last row number via the following two Describe calls:

dw.Describe("DataWindow.FirstRowOnPage") and
dw.Describe("DataWindow.LastRowOnPage")

This would allow you - for instance - to display a sum of only those
values that appear in the current window, without requiring a 'current
row' to be set.

On 27 Sep 2004 09:52:30 -0700, Tony wrote:

>The DataWindow displays 5 rows from a table of 600 (say). I
>want to get those rows that are currently displayed on the
>screen.
>GetItemString takes a row number, but I need to know which
>row or rows are displayed in order to extract the correct
>value.
>
>
>> Rows in a column? Do you mean you want to get the display
>> value for a column if you are using a code table or a drop
>> down DataWindow? Or are you trying to find out how many
>> rows are in a drop down DataWindow?
>>
>> If you want to get the display value for a column (as
>> opposed to the data value which the GetItemX method will
>> return) you need to use the Describe and Evaluate methods.
>> Here's an example:
>>
>> Dim ls_state As String
>> Dim ls_row As String
>>
>> ls_row = dw_main.CurrentRow
>>
>> ls_state=dw_main.Describe("evaluate('lookupdisplay(employe
>> e_state)',"+ls_row+")")
>>
>> What this Describe method call is doing is getting the
>> display value for the state column. This will return
>> California if the data value is CA, etc.
>>
>> If you want the number of rows in a drop Down DataWindow
>> you need to get a handle to the ChildDataWindow (see the
>> help for more information on Child DataWindows) and then
>> use the RowCount property.
>>
>> If neither of these is what you are looking for then never
>> mind. <g>
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 27 Sep 2004 07:14:16 -0700, Tony wrote:
>>
>> >Ah - that helps !!
>> >so how do I know how many rows are in a column?
>> >
>> >Thanks
>> >
>> >
>> >> You can use the GetItemX functions. They will return
>> the >> data value for the column.
>> >>
>> >> Regards,
>> >> Dave Fish
>> >> Sybase
>> >>
>> >> TeamSybase blogs: http://www.teamsybase.net/blogs
>> >>
>> >> DataWindow.NET code examples available on CodeXchange:
>> >> http://datawindownet.codexchange.sybase.com
>> >>
>> >> On 27 Sep 2004 06:05:13 -0700, Tony wrote:
>> >>
>> >> >If I have a datawindow with two columns the first a
>> >> column >of edits, the second a column of checkboxes =96
>> >> How do I >programmatically get the values for each of
>> the >> controls in >these two columns.
>> >>
>>


Jack Addington Posted on 2004-09-27 16:18:37.0Z
From: "Jack Addington" <jaddington@shaw.ca>
Newsgroups: sybase.public.datawindow.net
References: <41581cbe.73215257@forums.sybase.com> <41582038.7e81.1681692777@sybase.com>
Subject: Re: Getting data from columns
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: s010600e018e32f17.cg.shawcable.net
Message-ID: <41583d58$1@forums-2-dub>
X-Original-Trace: 27 Sep 2004 09:18:32 -0700, s010600e018e32f17.cg.shawcable.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 27 Sep 2004 09:18:34 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 27 Sep 2004 09:18:37 -0700
X-Trace: forums-1-dub 1096301917 10.22.108.75 (27 Sep 2004 09:18:37 -0700)
X-Original-Trace: 27 Sep 2004 09:18:37 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:450
Article PK: 124879

Tony,

Just guessing but I'm assuming you are thinking in dataset terms. In
datawindows the rowcount is related to the datawindow, not the columns.
Datawindow.Rowcount property will give you the number of rows. If you need
the number of values or rows in a dropdown list/dw then see Dave's response.

<Tony> wrote in message news:41582038.7e81.1681692777@sybase.com...
> Ah - that helps !!
> so how do I know how many rows are in a column?
>
> Thanks
>
>
>> You can use the GetItemX functions. They will return the
>> data value for the column.
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 27 Sep 2004 06:05:13 -0700, Tony wrote:
>>
>> >If I have a datawindow with two columns the first a
>> column >of edits, the second a column of checkboxes =96
>> How do I >programmatically get the values for each of the
>> controls in >these two columns.
>>