Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to dynamically change a datawindowchild within PBScript?

1,422 views
Skip to first unread message

Williams

unread,
Jun 8, 2004, 4:52:08 AM6/8/04
to
Hi all,

I want to change my datawindowchild name dynamically like you can
change the datawindow name (dw.dataobject = 'foobar'). For instance in
my DW I've got a DDDW called 'foo' and in my script this could be
changed to 'bar'.
Can anyone help?

Thank you
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp

Jim Smith

unread,
Jun 8, 2004, 9:10:22 AM6/8/04
to
Its the same as changing a datawindow. Biut first you must get a reference the
the child datawindow.

Try this:
datawindow ldw_child

dw.GetChild("Column Name of DDDW", ldw_child)

ldw_child.DataIbject = "FooBar"
ldw_child.SetTransObject(SQLCA)
ldw_child.Retrieve()

I hope this helps

Jim

On 8 Jun 2004 01:52:08 -0700,
in sybase.public.powerbuilder.datawindow

Jim Smith
jrsmithATduqlightDOTcom

Philip Salgannik

unread,
Jun 8, 2004, 9:28:58 AM6/8/04
to
1) Getchild won't be able to get a refeence into a variable of type
datawindow
2) datawindowchild does NOT have a .dataobject property

--
This is a FAQ, read Help, then search
www.groups.google.com/advanced_group_search

pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"Jim Smith" <jrs...@duqlight.com> wrote in message
news:40c5bb14$1@forums-2-dub...

Bruce Armstrong [TeamSybase]

unread,
Jun 8, 2004, 10:03:17 AM6/8/04
to

dw_x.Object.column_name.dddw.name = 'bar'

You may need to also specify the datacolumn and displaycolumn
attributes. Finally, you may need to do a GetChild and retrieve the
drop down datawindow manually (depending on when you make this
change).

On 8 Jun 2004 01:52:08 -0700, "Williams"
<wben...@webmail.altensi.fr> wrote:

Bruce Armstrong [TeamSybase]
http://www.teamsybase.com

Easy XML with PowerBuilder DOM: June 8 & 10, 2004
http://crm.sybase.com/sybase/www/ESD/ISUGJUNE2004Regbn.jsp

Two new books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups

Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com

ISUG Enhancement Requests
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement

Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org

---------------------------------------------------------------------
DISCLAIMER:

This newsgroup message is only intended for the recipient. Given that it
is a posting to a public newsgroup, that means if you can read this
message then you are the recipient. This message may contain information
that is confidential and protected from disclosure. And then again,
it may not.

Given that TeamSybase members are not employees of Sybase, the contents
of this message do not necessarily represent the views or policies of
Sybase. Given that TeamSybase is a diverse group of users of Sybase
products, the contents of this message do not necessarily represent the
views of a significant number of the members of TeamSybase. Given that the
author has mutliple personalities and hears voices in his head, the contents
of this message do not necessarily represent his own views.

Davy De Permentier

unread,
Jun 8, 2004, 10:13:22 AM6/8/04
to
To change the "DataObject" use :
* DWName.Modify("Columnname.DDDW.Name = name of DataWindow used as dddw")

To change the "DisplayColumn" and "DataColumn" (if needed), use :
* DWName.Modify("Columnname.DDDW.DataColumn='name of data column'")
* DWName.Modify("Columnname.DDDW.DisplayColumn='name of display column'")

HTH,
Davy

"Williams" <wben...@webmail.altensi.fr> wrote in message
news:40c57e8f$1@forums-2-dub...

0 new messages