Setting column's property in a datawindow from composite datawindow

Hi

I know this is easy but I cant get it to work.

I have two datawindows controls (dw_1, dw_2) in a composite datawindow
(dw_report).
I want to change Text of a header column of dw_2, so I try it using:

1. GetChild and Modify
------
datawindowchild ldw_child
Int li_Rtn
String ls_Error
dw_Report.SetTransObject ( SQLCA )
li_Rtn = dw_Report.GetChild ( "dw_2", ldw_Child )
/* This returns 1, no problem */
If li_Rtn = 1 Then
   ls_Error = ldw_Child.Modify ( "item_number_t.Text = ~'New Text~' ")
   /* ls_Error is empty string, no problem, but report doesnt show
item_number_t' text doesnt change to New Text*/
End If
// Retrieve
dw_Report.Retrieve ( with arguments)
------
Or
2. Using dot notations,
-------
dw_Report.Object.dw_2.Object.item_number_t.Text = 'New Text'
/* this one also doesnt change the text to new text */
dw_Report.Retrieve ( with arguments)
-------

Any help is appreciated, as  always
Yogee



0
Yogee
12/4/2002 7:38:28 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
1338 Views

Similar Articles

[PageSpeed] 49

Try retrieving first, then modify your text fields....

HTH,
Austin

On Wed, 4 Dec 2002 14:38:28 -0500,
 in powersoft.public.powerbuilder.datawindow
Yogee <yogee7@yahoo.com> wrote: 
>Hi
>
>I know this is easy but I cant get it to work.
>
>I have two datawindows controls (dw_1, dw_2) in a composite datawindow
>(dw_report).
>I want to change Text of a header column of dw_2, so I try it using:
>
>1. GetChild and Modify
>------
>datawindowchild ldw_child
>Int li_Rtn
>String ls_Error
>dw_Report.SetTransObject ( SQLCA )
>li_Rtn = dw_Report.GetChild ( "dw_2", ldw_Child )
>/* This returns 1, no problem */
>If li_Rtn = 1 Then
>   ls_Error = ldw_Child.Modify ( "item_number_t.Text = ~'New Text~' ")
>   /* ls_Error is empty string, no problem, but report doesnt show
>item_number_t' text doesnt change to New Text*/
>End If
>// Retrieve
>dw_Report.Retrieve ( with arguments)
>------
>Or
>2. Using dot notations,
>-------
>dw_Report.Object.dw_2.Object.item_number_t.Text = 'New Text'
>/* this one also doesnt change the text to new text */
>dw_Report.Retrieve ( with arguments)
>-------
>
>Any help is appreciated, as  always
>Yogee
>
>
>
0
Austin
12/4/2002 9:20:38 PM
Reply:

Similar Artilces:

To set/not to set 'Visible' property of datawindow columns ?
Hello, If I have a datawindow and I have say 10 columns in the datawindow, which retrieve data, but need not be displayed... Is it advisable to set the 'Visible' property to '0' for such columns or does it have no performance impact at all ? TIA, Ganesh It's probably more advisable to delete the DW Column Objects. Deleting the objects in the presentation layer just means that the values are not visible; these data set column values are still accessible through Get/SetItem()'s, dw expressions, etc... Good luck, Terry [TeamPS] and Sequel...

Properties of a datawindow on a composite datawindow
I have a composite report that has 2 nested datawindows. At run time, I want to modify the dataobject of one of the nested datawindows on the report. I am using the GetChild function to get a reference to the nested datawindow on the report. Here's the code I am using. dw_maintain_code is the nested datawindow on dw_composite. li_rtn = dw_composite.GetChild("dw_maintain_code",ldw_child1) //get reference ls_rtn = ldw_child1.Modify('dw_maintain_code.dataobject = d_code_sync') li_rtn = dw_code_type_list.ShareData(ldw_child1) The Modify returns an empty str...

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

how can I get or set property to a graph datawindow in a composite datawindow?
I make a composite style datawindow. There is a graph style datawindow in it. I can't get or set the graph style datawindow 's property like title, values.label and or so. the graph style datawindow 's datasource is extern data. I do it like this: datawindow dw_child dw_composite.getchild('graph', dw_child) dw_child.object.gr_1.title = 'hello' It failed! then I use this datastore ds_1 ds_1 = create datastore ds_1.dataobject = 'data_graph' ds_1.object.gr_1.title = 'hello' datawindow dw_child dw_composite.getchild('grap...

How set value into composite datawindow's column or text object
Hi experts: How set value into composite datawindow's column or text object . I try to do this: dw_1.object.d_1.object.username.text = "AAA" (username is text object.) But I get error ! Thanks for all. Wang wei From Taiwan TaoYuan ! Have you considered using a row designation as well? dw_1.object.d_1[rownum].object.username.text = "AAA" Have you examined the help file topic "Syntax for nested objects"? In article <8AdJB5sF$GA.143@forums.sybase.com>, wangwei@toamil.com.tw says... > Hi exp...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can not works). Also, I need access in each row then reset the value that I want in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the first row of each datawindow. It seems I used the loop access the value it doesn't work. Indeed, It has the all data for me but just right for the first row in each data window. Could you have any ideas, please!...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow!
This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C308EA.58A195E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can = not works). Also, I need access in each row then reset the value that I want = in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the = fi...

datawindows in composite datawindow used in datawindow.NET, are not sliding up
Hi, Problem: datawindows in composite datawindow used in "datawindow.NET", are not sliding up , if one dw is not visible or did not retrieve data. Resulting in unwanted spaces. The height of blank white space is equal to the height of the datawindow art design time. When I looked at the generated JavaScript, I noticed there is "div" for the datawindow with height 0.00in which is supposed to be not visible. Tried different options with html/xhtml/xml same result. But slides up ok when exported to pdf(using saveas) on web and in PB10.5 application. Also s...

How can I count number of rows in each datawindow in composit datawindow then access and set item in each row in each datawindow! #2
This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C308EA.0E4861E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi friends, I created a composite datawindow includes three datawindow. How can I count the number of rows in each datawindow? (Rowcount() function can = not works). Also, I need access in each row then reset the value that I want = in each row in each datawindow. I use the property to access to get data in each row in each datawindow, but the right value only happens in the = fi...

I need to create 'on the fly' a composite datawindow with data from other datawindows without retrieve again
problem: I need to create 'on the fly' a composite datawindow including several data (reports) from other datawindows without retrieve again (the other datawindows have data from previus dw. retrieve). I want just combine all datawindows in one to print in a signle page. Is there a method to do it ? Afentakis Andreas adr@pca.com.gr You could use some of PFC's functions, or create a composite dwo, with the same dwo's attached to the reports as in the main dwo's something like this: dw_composite.Object.d_report1.DataObject = dw_data1.dataobject dw...

accessing datawindow in composite datawindow
Hi All, I have a composite datawindow d_comp having two datawindow d_first and d_second. Using code, i want to save the content of the d_first and d_second datawindow content txt format. Is it possible to save the content using saveasascii or saveas function ?? i was trying to use dw_comp.object.d_first.saveasascii(ls_temptxfile,"~t","","~n") but getting error... Thanks . -Brijesh Hi, if that is really a composite datawindow you should be able to get a reference to d_first and d_second using getChild(). You get a DataWindowChild which impl...

Datawindow Syntax (Composit Datawindow)
Would you help me to create datawindow layout for the report of composite datawindow from DWsyntax at runtime? ...

External Datawindow in a Composite Datawindow
Hi All I have a question. Can I use an extrernal datawindow in a composite datawindow? If yes, how do we access its properties. The specific problem is that I want to combine two dws. One is generated externally and the other is a simple tabular dw coming from a db. If I try to use getchild() then I do not have columns for get child. I am using PB 7.0.3 on Windows 2000 Server with MS SQL Server. Thanks. Sincerely Saleem > Can I use an extrernal datawindow in a composite datawindow? If yes, how do we > access its properties. ldw_dw.object.r_pumpputyyppi.object...

copying datawindows to a composite datawindow
hi, I have a window with 3 different dw-reports. The problem I have is that one of the windows can be modify by the user, therefore if I include the updatable dw in the composite it will not reflect the latest information. How can I make sure I that when the updatable dw is changed, the changes are reflected in the composite also. Do I have to copy the dw and if so how can I do that, or is there an easier way to do that. Thanks Jose In article <35B4BC1A.DCF5FD47@cs.fiu.edu>, joband02@cs.fiu.edu says... > hi, I have a window with 3 different dw-reports. The problem I have ...

Web resources about - Setting column's property in a datawindow from composite datawindow - sybase.powerbuilder.datawindow

Resources last updated: 12/23/2015 7:13:12 AM