passing a datawindow using openwithparm

window 1 has a datawindow and when user clicks on one particular field I 
want to open another window (window 2) using openwithparm passing the 
datawindow; then I want manipulate some fields in window2.
How can I do that?
Any help will be appreciated.
thanks

0
Enrique
1/8/2011 9:13:03 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

3 Replies
2542 Views

Similar Articles

[PageSpeed] 55

Last time I did something like that, I put the data in a datastore in 
window 1, and shared it to the DW in window 1. When opening window 2 I 
passed the DS as PowerObjectParm. That results in a *reference* 
available in the Open event of window 2. I saved the reference in an 
instance variable - the Message object gets reused by Windows and is not 
guaranteed (actually you could pretty much say guaranteed not) to be 
unchanged later on. I then did a GetFullState on the DS and SetFullState 
on the DW in window 2. Now when you close window 2, you do GetChanges on 
the window 2 DW and SetChanges on the referenced DS. That allows you to 
have the option of the user canceling changes in window 2 (just don't do 
anything to the referenced DS if they hit the cancel button) and keeps 
the updating of the data in window 1 within the same unit of work as the 
rest of window 1.

Report Bugs to Sybase:  http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

On 1/8/2011 4:13 PM, Enrique wrote:
> window 1 has a datawindow and when user clicks on one particular field I
> want to open another window (window 2) using openwithparm passing the
> datawindow; then I want manipulate some fields in window2.
> How can I do that?
> Any help will be appreciated.
> thanks
>
0
Jerry
1/9/2011 1:16:22 AM
Hi Enrique;

  Yes, that will work fine as long as Window#1 is not closed and of course 
the DW Control destroyed along with it.  :-)

1) OpenWithParm (wn_two, DC_1)
2) In wn_two's Open event ...
   DataWindow  lo_dc
    lo_dc = Message.PowerObjectParm
   lo_dc.ShareData ( dc_2 )


Note: the technique I use here in this example requires that the DW Object 
in DC_2 be the same SQL structure as the DWO used in the source DC in Window 
#1 (that is the SQL Select statements are the same). If this is the case, 
then the easiest and best performance can be obtained using the ShareData 
command vs the RowsCopy or Get/SetChanges approach.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Enrique"  wrote in message news:4d28d35f@forums-1-dub...

window 1 has a datawindow and when user clicks on one particular field I
want to open another window (window 2) using openwithparm passing the
datawindow; then I want manipulate some fields in window2.
How can I do that?
Any help will be appreciated.
thanks 

0
Chris
1/9/2011 4:54:43 PM
On 9/01/2011 8:13 AM, Enrique wrote:
> window 1 has a datawindow and when user clicks on one particular field I
> want to open another window (window 2) using openwithparm passing the
> datawindow; then I want manipulate some fields in window2.

 From a GUI design perspective why would you want to open another window?
Is the data in window 2 that you are editing a subset of the data in 
window 1? If so, why not look at a way of editing within that window 
without the need for more windows.

Just a thought.

> How can I do that?
> Any help will be appreciated.
> thanks
>


0
Adam
1/9/2011 11:49:43 PM
Reply:

Similar Artilces:

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...

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...

I will print two datawindow in one page,and I use child datawindow.One master datawindow (dw_master)with two child datawindow(dc1 and dc2)
dw_master("dw_dc1",dc1) dw_master("dw_dc2",dc2) dc1 has a argument (arg1) dc2 has a argument (arg2) Arg1 and Arg2 are send by one column of dw_master. When I use retrieve() function,the datawindow can display normal,but when I print preview or use Zoom or printsetup() ,the childdatawindow dc2 can't display but dc1 normal! Why?? Thanks for your help! I'm having trouble understanding your question. Is this a composite or nested datawindow? On Mon, 6 May 2002 22:49:23 +0800, in powersoft.public.powerbuilder.datawindow spark <fenfei79@hot...

datawindow expressions using datacolumns from other datawindows
Is there a possibility to access datacolumns from other datawindows from a datawindow expression. In fact, I have two datawindows which have a master/detail-relation. For example I want to set a columns visible or protect property in the detail dw depending on the datavalue of a column in the master dw. Thanks Martin Martin, There is no direct way. You could, however, write a couple global functions... one to set a value, one to get a value (then call these from a computed field in the DW)... but you're probably better off doing this in a script. HTH, Greg -- ...

How to share the datawindow to inner datawindow of nested datawindow
How to share the datawindow to inner datawindow of nested datawindow. Ex -------- dw_1 is normal datawindow dw_nes is nested datawindow, both are placed one window dw_nes contain dw_child datawindow Question ---------------- i want to share dw_1 and dw_child. I have tried the below code, getting error dw_1.sharedata( dw_nes.object.dw_child) It's the dot notation. You will need to dw_nes.GetChild("dw_child", ldwc) where ldwc is a _local_ datawindowchild. <kzganesan@gmail.com> wrote in message news:4c64c402-bac5-4ee0-83aa-4ac08ffe43e5@r66g2000hsg.go...

Deploying datawindow reports using HTML Datawindow.
Hi all, we are trying to put some of our datawindow reports from the current PowerBuilder application on to the Web. Most of the datawindows include nested reports and N-Up presentation styles. With the help of manuals and other documents, we set up the EAServer environment and tried to implement a few reports, but so far, only simple tabular and grid datawindows come up fine but not others. There was one N-Up style datawindow, which had all the rows overlapped and the header information not displaying correctly. In case of Nested reports, a document says that they are not suppor...

DataWindow.NET : issue using external datawindow
Hello, I created an external datawindow with 3 columns, but I have error messages when I want to use it in my .NET application : When I want to insert rows, I get the message : "InsertRow was called when no DataWindow object was attached." I set in design mode my pbl library and also the datawindow name I want to use. I also tried to set it dynamically in the code, but it changes nothing. I'm sure SQLCA isn't useful for this kind of DataWindow, but I also tried to set it and I get the message "SetTransaction was called when no DataWindow object was att...

DataWindows and datawindow objects
Difference between Datawindow and datawindowobjects? - datawindow is a control on a userobject or a window - datawindowobject (DWObject) is a control within a datawindow, defined in the dataobject of the datawindow. You refer to it as <datawindow-instance>.Object.<datawindow object> HTH, Ben (bede) <Santhoshi> wrote in message news:3f8bee8b.4631.846930886@sybase.com... > Difference between Datawindow and datawindowobjects? Not exactly; DW Control is a "container" that reserves real-estate on the surface of a visual object. DW Obj...

Use DataWindow Object Properties in DataWindow Object Expression
Hi all, Can I make use of the properties of objects in the expression? For example, can I set an expression in COLUMN_A's color property which reference the color property of COLUMN_B. I don't know how to access properties in expressions. Can anyone help me? Thanks. Alex You can use the Describe() function. Alex wrote in message <362D543F.F34B5F33@hotmail.com>... >Hi all, > Can I make use of the properties of objects in the expression? >For example, can I set an expression in COLUMN_A's color property which >reference the color property of...

DataWindow Within DataWindow
How Can I access/modify object/control from a Datawindow within Datawindow. When i access/modify object/control from a Datawindow i used dw_1.modify("name.text = 'new val'") but within another datawindow or child datawindow it doesnt work. Your description is difficult to understand due to the terminology. First, a datawindow is assigned to a control - either a datawindow control or a datastore. Second, the Modify function can only be called within a script. With that as a basis, can you rephrase the question and describe more precisely what you want to do? ...

DataWindow.NET : issue using external datawindow #2
Hello, I created an external datawindow with 3 columns, but I have error messages when I want to use it in my VB.NET application : When I want to insert rows, I get the message : "InsertRow was called when no DataWindow object was attached." I set in design mode my pbl library and also the datawindow name I want to use. I also tried to set it dynamically in the code, but it changes nothing (I can see the DataWindow in design mode). I'm sure SQLCA isn't useful for this kind of DataWindow, but I also tried to set it and I get the message "SetTransaction ...

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. 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 ...

modifiyin a datawindow in a datawindow
Hi, When I want to modify a datawindow, then it's just dw1.modify() But what do I have to do when I want to modify a datawindow in a datwindow ? I tried : dw1.dw2.modify() but that doesn't work. Anyone can help me out with this ? thanks. Regards, David get the dw via getchild & apply modify In article <4575976f.4dda.1681692777@sybase.com>, David says... > Hi, > When I want to modify a datawindow, then it's just > dw1.modify() > > But what do I have to do when I want to modify a datawindow > in a datwindow ? > I tried : dw...

datawindow
Add direct setting and getting capability for the datawindow where clause. This would have to be a string array in case of unions. Return ONLY the where clause(s) in the main select (in case of sub-selects, ignore the where clause or somehow list it as a subselect in the where or a subselect in the select). It would be great if I could just get and set this as a value and have the datawindow automatically change (or add) the where clause as specified. This is for setting the where clause dynamically at run time. Currently have to parse through the datawindow.table.select looking f...

Web resources about - passing a datawindow using openwithparm - sybase.powerbuilder.datawindow

Resources last updated: 11/21/2015 1:53:23 AM