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]
1 |
string <span>dwcomponent</span>.<span>SetColumnLink</span> ( string <span>columnname</span>, string <span>link</span>, string <span>linkargs</span>, string <span>linktarget</span> ) |
Argument |
Description |
||
---|---|---|---|
dwcomponent |
A reference to a Web DataWindow server |
||
columnname |
The name of a column in the DataWindow |
||
link |
A URL that is the target of a link (HTML The URL can include parameters. Additional parameters from linkargs may Sets the value of the HTML.Link property. |
||
linkargs |
A string in the form:
Argname is an page parameter to be passed Exp is a DataWindow expression that is The evaluated linkargs string is appended For information on constants and quotation marks in linkargs expressions, Sets the value of the HTML.LinkArgs property. |
||
linktarget |
The name of a target frame or window You can use linktarget to implement a If linktarget is null or an empty string 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:
1 |
dwMine.<span>SetColumnLink</span> ("empid", "empdetail.stm", |
1 |
"pagearg_empid='String(empid)'", ""); |