Datawindows with child datawindows

I want to create a datawindow whose only data is three columns that will 
themselves be drop-down data windows.  These child datawindows will be 
populated in PB script with dw_1.GetChild().  When I create that parent 
datawindow (New | Datawindow | Freeform), what do I choose in the next 
dialog box ("Which datasource would you like to use?")  External?  
Thanks.
0
Rick
8/15/2008 9:34:25 PM
📁 sybase.powerbuilder.general
📃 62418 articles.
⭐ 19 followers.

💬 8 Replies
👁️‍🗨️ 1941 Views


That depends on how you want to populate and use the columns of the main DW. 
The DDDW is an edit style that assists the user in selecting a value for the 
column in the main DW. If you want to retrieve the values and use them to 
update a table, use SQL. If you want to InsertRow, SetItem, GetItem then 
External.
"Rick" <rick@invalid.net> wrote in message 
news:MPG.230fc03f5ded4179897bf@forums.powersoft.com...
>I want to create a datawindow whose only data is three columns that will
> themselves be drop-down data windows.  These child datawindows will be
> populated in PB script with dw_1.GetChild().  When I create that parent
> datawindow (New | Datawindow | Freeform), what do I choose in the next
> dialog box ("Which datasource would you like to use?")  External?
> Thanks. 

0
Jerry
8/15/2008 10:28:46 PM
Thanks.  I don't need to update a table, so I'll use External.  So with 
this parent dw, I don't do a Retrieve() at all, right?  I know I use 
GetChild() to populate the child dw's, but how do I get that data into 
the parent dw?  Thanks.
In article <48a6031e$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
> That depends on how you want to populate and use the columns of the main DW. 
> The DDDW is an edit style that assists the user in selecting a value for the 
> column in the main DW. If you want to retrieve the values and use them to 
> update a table, use SQL. If you want to InsertRow, SetItem, GetItem then 
> External.
> 
> "Rick" <rick@invalid.net> wrote in message 
> news:MPG.230fc03f5ded4179897bf@forums.powersoft.com...
> >I want to create a datawindow whose only data is three columns that will
> > themselves be drop-down data windows.  These child datawindows will be
> > populated in PB script with dw_1.GetChild().  When I create that parent
> > datawindow (New | Datawindow | Freeform), what do I choose in the next
> > dialog box ("Which datasource would you like to use?")  External?
> > Thanks. 
> 
> 
> 
0
Rick
8/20/2008 8:47:58 PM
Correct. Rather than Retrieve() you would use InsertRow() as needed. Then 
SetItem() to populate initial values, or use the Initial property of the 
column for defaults. And of course GetItemXXXXX to pick up the user's 
eventual choices.
"Rick" <rick@invalid.net> wrote in message 
news:MPG.23164cee48e766909897c0@forums.powersoft.com...
> Thanks.  I don't need to update a table, so I'll use External.  So with
> this parent dw, I don't do a Retrieve() at all, right?  I know I use
> GetChild() to populate the child dw's, but how do I get that data into
> the parent dw?  Thanks.
>
> In article <48a6031e$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
>> That depends on how you want to populate and use the columns of the main 
>> DW.
>> The DDDW is an edit style that assists the user in selecting a value for 
>> the
>> column in the main DW. If you want to retrieve the values and use them to
>> update a table, use SQL. If you want to InsertRow, SetItem, GetItem then
>> External.
>>
>> "Rick" <rick@invalid.net> wrote in message
>> news:MPG.230fc03f5ded4179897bf@forums.powersoft.com...
>> >I want to create a datawindow whose only data is three columns that will
>> > themselves be drop-down data windows.  These child datawindows will be
>> > populated in PB script with dw_1.GetChild().  When I create that parent
>> > datawindow (New | Datawindow | Freeform), what do I choose in the next
>> > dialog box ("Which datasource would you like to use?")  External?
>> > Thanks.
>>
>>
>> 

0
Jerry
8/21/2008 12:20:42 AM
Thanks much; I'm still feeling obtuse.  My parent dw, created as 
External, consists of two columns only.  Each column references its own 
child dw (regular internal SQL), each of which has a retrieval arg.  I 
do my GetChild() to get my reference vars ldwc_1 and ldwc_2, then pass 
the retrieval arg to the child dw's via ldwc_1.Retrieve(argname).  That 
populates the child dw's fine.
But I can't get the parent dw to even display, and I'd like it to 
display the data from the child dw's in dropdowns.  If I do an InsertRow 
on the parent, then it displays, but before it does, the retrieval arg 
dialog pops up and asks me for the retrieval args for both children (of 
course).  I know I'm missing something.
Thanks for any help.


In article <48acb4da$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
> Correct. Rather than Retrieve() you would use InsertRow() as needed. Then 
> SetItem() to populate initial values, or use the Initial property of the 
> column for defaults. And of course GetItemXXXXX to pick up the user's 
> eventual choices.
> 
> "Rick" <rick@invalid.net> wrote in message 
> news:MPG.23164cee48e766909897c0@forums.powersoft.com...
> > Thanks.  I don't need to update a table, so I'll use External.  So with
> > this parent dw, I don't do a Retrieve() at all, right?  I know I use
> > GetChild() to populate the child dw's, but how do I get that data into
> > the parent dw?  Thanks.
> >
> > In article <48a6031e$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
> >> That depends on how you want to populate and use the columns of the main 
> >> DW.
> >> The DDDW is an edit style that assists the user in selecting a value for 
> >> the
> >> column in the main DW. If you want to retrieve the values and use them to
> >> update a table, use SQL. If you want to InsertRow, SetItem, GetItem then
> >> External.
> >>
> >> "Rick" <rick@invalid.net> wrote in message
> >> news:MPG.230fc03f5ded4179897bf@forums.powersoft.com...
> >> >I want to create a datawindow whose only data is three columns that will
> >> > themselves be drop-down data windows.  These child datawindows will be
> >> > populated in PB script with dw_1.GetChild().  When I create that parent
> >> > datawindow (New | Datawindow | Freeform), what do I choose in the next
> >> > dialog box ("Which datasource would you like to use?")  External?
> >> > Thanks.
> >>
> >>
> >> 
> 
> 
> 
0
Rick
8/21/2008 5:20:58 AM
Turn Autoretrieve off on the columns in the parent or save a blank row of 
data in each DDDW.
"Rick" <rick@invalid.net> wrote in message 
news:MPG.2316c5307d25eb939897c1@forums.powersoft.com...
> Thanks much; I'm still feeling obtuse.  My parent dw, created as
> External, consists of two columns only.  Each column references its own
> child dw (regular internal SQL), each of which has a retrieval arg.  I
> do my GetChild() to get my reference vars ldwc_1 and ldwc_2, then pass
> the retrieval arg to the child dw's via ldwc_1.Retrieve(argname).  That
> populates the child dw's fine.
>
> But I can't get the parent dw to even display, and I'd like it to
> display the data from the child dw's in dropdowns.  If I do an InsertRow
> on the parent, then it displays, but before it does, the retrieval arg
> dialog pops up and asks me for the retrieval args for both children (of
> course).  I know I'm missing something.
>
> Thanks for any help.
>
>
>
>
> In article <48acb4da$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
>> Correct. Rather than Retrieve() you would use InsertRow() as needed. Then
>> SetItem() to populate initial values, or use the Initial property of the
>> column for defaults. And of course GetItemXXXXX to pick up the user's
>> eventual choices.
>>
>> "Rick" <rick@invalid.net> wrote in message
>> news:MPG.23164cee48e766909897c0@forums.powersoft.com...
>> > Thanks.  I don't need to update a table, so I'll use External.  So with
>> > this parent dw, I don't do a Retrieve() at all, right?  I know I use
>> > GetChild() to populate the child dw's, but how do I get that data into
>> > the parent dw?  Thanks.
>> >
>> > In article <48a6031e$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
>> >> That depends on how you want to populate and use the columns of the 
>> >> main
>> >> DW.
>> >> The DDDW is an edit style that assists the user in selecting a value 
>> >> for
>> >> the
>> >> column in the main DW. If you want to retrieve the values and use them 
>> >> to
>> >> update a table, use SQL. If you want to InsertRow, SetItem, GetItem 
>> >> then
>> >> External.
>> >>
>> >> "Rick" <rick@invalid.net> wrote in message
>> >> news:MPG.230fc03f5ded4179897bf@forums.powersoft.com...
>> >> >I want to create a datawindow whose only data is three columns that 
>> >> >will
>> >> > themselves be drop-down data windows.  These child datawindows will 
>> >> > be
>> >> > populated in PB script with dw_1.GetChild().  When I create that 
>> >> > parent
>> >> > datawindow (New | Datawindow | Freeform), what do I choose in the 
>> >> > next
>> >> > dialog box ("Which datasource would you like to use?")  External?
>> >> > Thanks.
>> >>
>> >>
>> >>
>>
>>
>> 

0
Jerry
8/21/2008 7:55:06 AM
THANK YOU--that did it.  Much appreciated.  My last hurdle: for some 
reason when the parent dw first opens only the first dw child is 
displaying.  If you tab to, or click on, the second dw then it displays.  
For both child dw's I have:
dw_parent.GetChild("colname",ldwc_x)
ldwc_x.settransobject(SQLCA)
ldwc_x.Retrieve("XXX")        // retrieval argument for each dddw
ldwc_x.InsertRow(0)
then I insert a row into dw_parent.  Both dw's have the Visible property 
checked.  But for some reason only dw 1 displays at first.  Clicking on 
dw #2 then does display it.  Any thoughts?  Thanks much.
In article <48ad1f5a$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
> Turn Autoretrieve off on the columns in the parent or save a blank row of 
> data in each DDDW.
> 
0
Rick
8/21/2008 6:26:42 PM
Do the InsertRow() on dw_parent first?
"Rick" <rick@invalid.net> wrote in message 
news:MPG.231779a4c85467a49897c2@forums.powersoft.com...
> THANK YOU--that did it.  Much appreciated.  My last hurdle: for some
> reason when the parent dw first opens only the first dw child is
> displaying.  If you tab to, or click on, the second dw then it displays.
> For both child dw's I have:
>
> dw_parent.GetChild("colname",ldwc_x)
> ldwc_x.settransobject(SQLCA)
> ldwc_x.Retrieve("XXX") // retrieval argument for each dddw
> ldwc_x.InsertRow(0)
>
> then I insert a row into dw_parent.  Both dw's have the Visible property
> checked.  But for some reason only dw 1 displays at first.  Clicking on
> dw #2 then does display it.  Any thoughts?  Thanks much.
>
> In article <48ad1f5a$1@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
>> Turn Autoretrieve off on the columns in the parent or save a blank row of
>> data in each DDDW.
>> 

0
Jerry
8/22/2008 1:44:23 PM
THANK YOU!  I'd tried that before but your help emboldened me to push 
forward in another direction.  It turned out to be something relatively 
minor -- I checked the 'Always Show Arrow' property in the Edit tab for 
each child datawindow.  I guess child dddw objects might just go 
invisible unless that property is checked?  No, because the *first* dddw 
was visible even without that property.  In any case, it's now fine.  
Thank you very much for your help.
In article <48aec2b7@forums-1-dub>, jNOsSPAMsiegel@yahoo!.com says...
> Do the InsertRow() on dw_parent first?
> 
0
Rick
8/22/2008 2:15:01 PM
Reply: