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.

Adding Datawindow Child to the column dynamically

4 posts in DataWindow .NET Last posting was on 2004-10-18 03:05:51.0Z
Jun Posted on 2004-10-14 19:38:10.0Z
Sender: e50.416ed359.1804289383@sybase.com
From: Jun
Newsgroups: sybase.public.datawindow.net
Subject: Adding Datawindow Child to the column dynamically
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <416ed5a2.e70.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 Oct 2004 12:38:10 -0700
X-Trace: forums-1-dub 1097782690 10.22.241.41 (14 Oct 2004 12:38:10 -0700)
X-Original-Trace: 14 Oct 2004 12:38:10 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:537
Article PK: 124964

Hi, I am trying to add datawindow child to a Column of
Datawindow dynamically from the VB.NET environment.

And this datawindow child will be dropdown datawindow which
will populate the values for the column.

Can I do something like

dw_control_name.Modify(" syntax to add dddw to datawindow
column")

if I have the dddw in the same PB library as the main
datawindow, will that work without creating an instance of
datawindow child in the code?
if possible, what is the " syntax to add dddw to datawindow
column" in the Modify Statement?

Thanks.


dfish Posted on 2004-10-14 20:22:15.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Adding Datawindow Child to the column dynamically
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <416edf4c.122706011@forums.sybase.com>
References: <416ed5a2.e70.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-134.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-134.sybase.com
Date: 14 Oct 2004 13:22:15 -0700
X-Trace: forums-1-dub 1097785335 10.22.120.134 (14 Oct 2004 13:22:15 -0700)
X-Original-Trace: 14 Oct 2004 13:22:15 -0700, vpn-dub-134.sybase.com
Lines: 42
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:538
Article PK: 124966

You can do this and the best way to get the syntax is to use the
DataWindow Syntax tool in DataWindow Designer. Select the File\New
menu option, click on the Tools tab and double click on the DataWindow
Syntax icon.

On the Syntax menu, select Modify->Attributes. Select Column in the
drop down and scroll the attributes listbox until you see the DDDW
properties. You can then build the syntax you want and copy and paste
it into your code. The DDDW will need to be in the same .pbl as the
main DataWindow or you will need to add that .pbl to the librarylist
property for the main DataWindow.

Regards,
Dave Fish
Sybase

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

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

On 14 Oct 2004 12:38:10 -0700, Jun wrote:

>Hi, I am trying to add datawindow child to a Column of
>Datawindow dynamically from the VB.NET environment.
>
>And this datawindow child will be dropdown datawindow which
>will populate the values for the column.
>
>Can I do something like
>
>dw_control_name.Modify(" syntax to add dddw to datawindow
>column")
>
>if I have the dddw in the same PB library as the main
>datawindow, will that work without creating an instance of
>datawindow child in the code?
>if possible, what is the " syntax to add dddw to datawindow
>column" in the Modify Statement?
>
>Thanks.


Jun Posted on 2004-10-14 21:17:04.0Z
Sender: e50.416ed359.1804289383@sybase.com
From: Jun
Newsgroups: sybase.public.datawindow.net
Subject: Re: Adding Datawindow Child to the column dynamically
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <416eecd0.1033.1681692777@sybase.com>
References: <416edf4c.122706011@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 Oct 2004 14:17:04 -0700
X-Trace: forums-1-dub 1097788624 10.22.241.41 (14 Oct 2004 14:17:04 -0700)
X-Original-Trace: 14 Oct 2004 14:17:04 -0700, 10.22.241.41
Lines: 69
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:539
Article PK: 124967

Thanks. It worked and it's cool stuff.

Here is my syntax:

dw_selection_control.Modify("vendorname.dddw.name=vendornamedropdown
vendorname.dddw.displaycolumn=suppliername
vendorname.dddw.datacolumn=suppliername
vendorname.dddw.percentwidth=0 vendorname.dddw.lines=0
vendorname.dddw.limit=0 vendorname.dddw.allowedit=no
vendorname.dddw.useasborder=yes vendorname.dddw.case=any
vendorname.dddw.vscrollbar=yes")

Cool thing is I didn't even have to remove the description
for "Edit" attributes of the Column. I guess above Modify
statement was smart enough to know Now the Column is DDDW
instead of Edit (or did above statem automatically remove
the Edit attribute?).

And another tough question for you. Now is it possible to
do above modification for the Column in Just ONE Row of the
DW and Keep the Other Rows the same as before?

Thank you.

> You can do this and the best way to get the syntax is to
> use the DataWindow Syntax tool in DataWindow Designer.
> Select the File\New menu option, click on the Tools tab
> and double click on the DataWindow Syntax icon.
>
> On the Syntax menu, select Modify->Attributes. Select
> Column in the drop down and scroll the attributes listbox
> until you see the DDDW properties. You can then build the
> syntax you want and copy and paste it into your code. The
> DDDW will need to be in the same .pbl as the main
> DataWindow or you will need to add that .pbl to the
> librarylist property for the main DataWindow.
>
> Regards,
> Dave Fish
> Sybase
>
> TeamSybase blogs: http://www.teamsybase.net/blogs
>
> DataWindow.NET code examples available on CodeXchange:
> http://datawindownet.codexchange.sybase.com
>
> On 14 Oct 2004 12:38:10 -0700, Jun wrote:
>
> >Hi, I am trying to add datawindow child to a Column of
> >Datawindow dynamically from the VB.NET environment.
> >
> >And this datawindow child will be dropdown datawindow
> which >will populate the values for the column.
> >
> >Can I do something like
> >
> >dw_control_name.Modify(" syntax to add dddw to datawindow
> >column")
> >
> >if I have the dddw in the same PB library as the main
> >datawindow, will that work without creating an instance
> of >datawindow child in the code?
> >if possible, what is the " syntax to add dddw to
> datawindow >column" in the Modify Statement?
> >
> >Thanks.
>


Jim O'Neil [Sybase] Posted on 2004-10-18 03:05:51.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Adding Datawindow Child to the column dynamically
Message-ID: <khc6n0h23mlvgosntgpcav5qoj90de5kha@4ax.com>
References: <416edf4c.122706011@forums.sybase.com> <416eecd0.1033.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: vpn-concord-097.sybase.com
X-Original-Trace: 17 Oct 2004 20:05:47 -0700, vpn-concord-097.sybase.com
Lines: 82
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 17 Oct 2004 20:05:48 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 17 Oct 2004 20:05:51 -0700
X-Trace: forums-1-dub 1098068751 10.22.108.75 (17 Oct 2004 20:05:51 -0700)
X-Original-Trace: 17 Oct 2004 20:05:51 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:554
Article PK: 124981

In response to your next 'tough question' the answer is maybe. Many
properties allow for expressions and you can use an expression like
"IF (GetRow() = N, val1, val2)" to have different values apply for
propeties like vendorname.dddw.vscrollbar based on the row number.
However not all properties allow expressions, so I'm not completely
sure you can do all that you want here. If not, then another
alternative is to add two controls and make one or the other hidden
based on the GetRow() method, since the visible property is definitely
one that can have an expression.

On 14 Oct 2004 14:17:04 -0700, Jun wrote:

>Thanks. It worked and it's cool stuff.
>
>Here is my syntax:
>
>dw_selection_control.Modify("vendorname.dddw.name=vendornamedropdown
>vendorname.dddw.displaycolumn=suppliername
>vendorname.dddw.datacolumn=suppliername
>vendorname.dddw.percentwidth=0 vendorname.dddw.lines=0
>vendorname.dddw.limit=0 vendorname.dddw.allowedit=no
>vendorname.dddw.useasborder=yes vendorname.dddw.case=any
>vendorname.dddw.vscrollbar=yes")
>
>Cool thing is I didn't even have to remove the description
>for "Edit" attributes of the Column. I guess above Modify
>statement was smart enough to know Now the Column is DDDW
>instead of Edit (or did above statem automatically remove
>the Edit attribute?).
>
>And another tough question for you. Now is it possible to
>do above modification for the Column in Just ONE Row of the
>DW and Keep the Other Rows the same as before?
>
>Thank you.
>
>
>
>> You can do this and the best way to get the syntax is to
>> use the DataWindow Syntax tool in DataWindow Designer.
>> Select the File\New menu option, click on the Tools tab
>> and double click on the DataWindow Syntax icon.
>>
>> On the Syntax menu, select Modify->Attributes. Select
>> Column in the drop down and scroll the attributes listbox
>> until you see the DDDW properties. You can then build the
>> syntax you want and copy and paste it into your code. The
>> DDDW will need to be in the same .pbl as the main
>> DataWindow or you will need to add that .pbl to the
>> librarylist property for the main DataWindow.
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 14 Oct 2004 12:38:10 -0700, Jun wrote:
>>
>> >Hi, I am trying to add datawindow child to a Column of
>> >Datawindow dynamically from the VB.NET environment.
>> >
>> >And this datawindow child will be dropdown datawindow
>> which >will populate the values for the column.
>> >
>> >Can I do something like
>> >
>> >dw_control_name.Modify(" syntax to add dddw to datawindow
>> >column")
>> >
>> >if I have the dddw in the same PB library as the main
>> >datawindow, will that work without creating an instance
>> of >datawindow child in the code?
>> >if possible, what is the " syntax to add dddw to
>> datawindow >column" in the Modify Statement?
>> >
>> >Thanks.
>>