SetPosition method (DataWindows)
Description
Moves a control within the DataWindow to another band or changes
the front–to-back order of controls within a band.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Web |
Server component |
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span>.<span>SetPosition</span> ( string <span>controlname</span>, string <span>band</span> , boolean <span>bringtofront </span>) |
[Web DataWindow server component]
1 |
short <span>dwcontrol</span>.<span>SetPosition</span> ( string <span>controlname</span>, string <span>band</span>, boolean <span>bringtofront</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>SetPosition</span> ( string <span>controlname</span>, string <span>band</span>, boolean <span>bringtofront</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or |
controlname |
The name of the control within the DataWindow |
band |
A string whose value is the name of the Band names are detail, header, footer, summary, header.#, |
bringtofront |
A boolean indicating whether you want
|
Return Values
Returns 1 when it succeeds and –1 if an error occurs.
If any argument’s value is null, in PowerBuilder and JavaScript
the method returns null.
Usage

For setting the position of controls in the front-to-back
order of a PowerBuilder window, see SetPosition in
the PowerScript Reference.
Examples
This statement moves oval_red in dw_rpt
to the header and brings it to the front:
1 |
dw_rpt.<span>SetPosition</span>("oval_red", "header", true) |
This statement does not change the position of oval_red
, but does bring it to the front:
1 |
dw_rpt.<span>SetPosition</span>("oval_red", "", true) |
This statement moves oval_red to the footer,
but does not bring it to the front:
1 |
dw_rpt.<span>SetPosition</span>("oval_red", "footer", false) |