Cols.clear()
This article is about the clear() function of the Cols object.
Cols.clear()
Clears the value of the columns in scope.
Returns a UdbCols object.
Syntax
$.udb( *ds* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).clear( [quiet] )
$.udb( *ds* ).rowSet( *rowSet* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).clear( [quiet] )
$.udb( *ds* ).searchCols( [columns] ).clear( [quiet] )
*quiet* ::= { true | [false] }
The required ds parameter is a data source selector.
The optional rowSet parameter is a rowset identifier. If the .rowSet() clause is omitted, then .rowSet('current') is assumed.
The required rowRef1, and optional rowRef2, are row selectors. Unlike the column meta-information functions, clearing an actual value requires a specific record to be identified.
The optional columns is a column selector. If omitted, all columns in scope are selected.
The optional quiet is a boolean that determines whether the cleared value is immediately propagated to all controls that may show it. The default is false, which means it is shown immediately.
Example
$.udb('EMP').rows('current').cols('EMPNO').clear();
Related events
Internally, clear() sets the value of the columns in scope to '', so it triggers the same events as .val() does when a value is specified.
| Event | Applies to | Occurs when |
|---|---|---|
| rowpreupdate | Data source objects | Before a record is updated |
| colpreupdate | Data source objects | Before a value in a column is updated |
| colpostupdate | Data source objects | After a value in a record is updated |
| rowpostupdate | Data source objects | After a record is updated |