Changing the DataWindow in the Web ActiveX – PB Docs 126

Changing the DataWindow in the Web ActiveX

When you associate a DataWindow object with a DataWindow control,
you are setting the initial value of the DataWindow control’s
SourceFileName and DataWindowObject properties.

During execution, this tells your application to:

  1. Look for DataWindow objects
    in the library (PBL file) or
    runtime library (PBD file) specified in the control’s SourceFileName
    property.

  2. Create an instance of the DataWindow object specified
    in the control’s DataWindowObject property (which must
    be in the specified library) and use it in the control.

Setting the SourceFileName and DataWindowObject properties
in code

In addition to specifying the DataWindow object in the Window
painter, you can switch the object that displays in the control
during execution by changing the value of the SourceFileName and
DataWindowObject properties in code.

You might simply change the DataWindowObject property to use
a different DataWindow object from the same library, or you might
change both properties to use a DataWindow object from some other
library.

For information about URLs for SourceFileName,
see “Specifying a DataWindow
object for the control”
.

For more information about the SourceFileName
and DataWindowObject properties, see the DataWindow Reference.

Using PSR files

If you want to dynamically put a PSR file into a DataWindow
control at execution time, change the control’s SourceFileName property
to an empty string and specify a URL for the PSR file as the value
for the DataWindowObject property.

Examples

This example shows the code to set the properties in JavaScript.
The code changes the DataWindow object in dw_emp, a DataWindow
control in a form or Web page. Dw_emp is saved as part
of the form or Web page definition. The value for DataWindowObject
is d_emp_hist; it was created in the DataWindow painter
and is stored in the library named emp.pbl, the value for SourceFileName.

Web ActiveX

For the Web ActiveX on a Web page, you set the SourceFileName
and DataWindowObject properties directly.

To display the DataWindow object d_emp_hist
from the library emp.pbl in the DataWindow control dw_emp,
you can code:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x