SetColumnLink – PB Docs 150

SetColumnLink method (DataWindows)

Description

Specifies information used for constructing hyperlinks for
data in a column in generated HTML.

Controls

DataWindow type

Method applies to

Web

Server component

Syntax

[Web DataWindow server component]

Argument

Description

dwcomponent

A reference to a Web DataWindow server
component.

columnname

The name of a column in the DataWindow
object associated with the server component whose values you want
formatted as hyperlinks in the generated HTML.

link

A URL that is the target of a link (HTML
A element) generated for each data item in the column.

The URL can include parameters. Additional parameters from linkargs may
be added when the HTML is generated.

Sets the value of the HTML.Link property.

linkargs

A string in the form:

Argname is an page parameter to be passed
to the server.

Exp is a DataWindow expression that is
evaluated, and whose value is converted using URL encoding and included
in the string.

The evaluated linkargs string is appended
to URL in link when HTML is generated to produce
a hyperlink for each data item.

For information on constants and quotation marks in linkargs expressions,
see SetSelfLink.

Sets the value of the HTML.LinkArgs property.

linktarget

The name of a target frame or window
for the hyperlink specified in the Link property. The target is
included in the HTML element using the HTML TARGET attribute.

You can use linktarget to implement a
master/detail page design by directing the detail page
for a data item to a different window or frame.

If linktarget is null or an empty string
(“”), then no TARGET attribute is generated.

Sets the value of the HTML.LinkTarget property.

Return Values

Returns an empty string if successful and the syntax error
message from the Modify method if it fails.

Usage

This method calls the Modify method of the server component’s
DataStore to set the property.

For information about using the Web DataWindow, see the DataWindow Programmers
Guide
.

Examples

This JavaScript example for a server-side script
sets up hyperlinks for data in the empid column. The data links
to a detailed employee report in an HTML template called empdetail.stm.

The employee id is passed as a page parameter so the empdetail
scripts can use it as a retrieval argument. The column name is specified
as the expression. Empid is a numeric column so its value has to
be converted to a string for the page parameter value. When the
server component generates the HTML, it evaluates empid for each
row and includes the data value as the link argument:

See Also


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