1. Albert John
  2. PowerBuilder
  3. Thursday, 27 May 2021 04:47 AM UTC

Hi guys , I was trying to deal with a datawindow which is composite style,due to the report was complex I tried to use this style though,it was combined by 11 datawindows and each datawindow has a retrieve agruement which is a string, due to the PB is kind of old school which I totally was NOT able to Google this question anyway,I have 3 questions about composite style datawindow, thank you so much if you answered my question:

#1 how do I retrieve a this kind of datawindow compared to the regular datawindow?

#2 if one of datawindow within the composite style datawindow was NOT fit in the size of width ,how do I deal with this kind of issue?

#3 how do I add some recrods in a datawindow which is grid style  within the composite style datawindow?

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 27 May 2021 05:24 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Albert.

#1 how do I retrieve a this kind of datawindow compared to the regular datawindow?

There are several ways:

You can specify retrieval arguments for the composite datawindow. (its in the properties page) You can specify the defined arguments as retrieval arguments for the nested datawindows. Retrieve the datawindow as normal datawindows.

Another way is to fill the nested datawindows by script. Use this if you need more control about this process. Use the GetChild fuction to get the datawindow child for a (each) nested datawindow. With this child you can do what you want: retrieve, copy data, share data, insert rows, change data, ... (see #3)

 

 

#2 if one of datawindow within the composite style datawindow was NOT fit in the size of width ,how do I deal with this kind of issue?

The width of the nested datawindow in the composite datawindow should be big enough. If not the data will clipped. You could change the width at runtime (Modify statement).

 

 

#3 how do I add some recrods in a datawindow which is grid style  within the composite style datawindow?

Use GetChild funtion to get the Datawindow child for the nested datawindow. With this child you can almost work like with a datawindow control.

DataWindowChild ldwc_child

dw_comp.GetChild ("dw_nested", ldwc_child)  // "dw_nested" is the name of the object in the composite datawindow that holds your nested datawindow
ldwc_child.InsertRow(1)
...

 

HTH,

René

Comment
  1. Albert John
  2. Thursday, 27 May 2021 05:46 AM UTC
I really apperciate it sir
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.