ClearValues method (DataWindows)
Description
Deletes all the items from a value list or code table associated
with a DataWindow column. (A value list is called a code table when
it has both display and data values.) ClearValues does not affect
the data stored in the column.
A separate method name is provided as an alternative syntax
for the Web DataWindow server component, which cannot use overloaded
methods.
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>ClearValues</span> ( string <span>column</span> )<br>integer <span>dwcontrol</span>.<span>ClearValues</span> ( integer <span>column</span> ) |
[Web DataWindow server component]
1 |
short <span>dwcontrol</span>.<span>ClearValues</span> ( string <span>column</span> )<br>short <span>dwcontrol</span>.<span>ClearValuesByColNum</span> ( short <span>column</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>ClearValues</span> ( string <span>column</span> )<br>number <span>dwcontrol</span>.<span>ClearValues</span> ( number <span>column</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or |
column |
The column whose value list you want |
Return Values
Returns 1 if it succeeds and –1 if an error occurs.
The return value is usually not used.
Usage
The edit style of the column can be DropDownListBox, Edit,
or RadioButton. ClearValues has no effect when column has
the EditMask or DropDownDataWindow edit style.
Examples
This statement clears all values from the drop-down
list of dw_Employee’s status column:
1 |
dw_Employee.<span>ClearValues</span>("status") |