JSDO properties, methods, and events reference : addItem( ) method
  

addItem( ) method

Adds an item to a list view based on the working record of a specified table reference.
The appearance and content of the list view item are controlled by a specified template and format, respectively:
*The template is defined by setItemTemplate( ), optionally overridden for this list view by setListView( ).
*The format is defined by setListView( ), optionally overridden for this item by the format parameter.
Return type: null
Applies to: progress.ui.UIHelper class, table reference property (UIHelper class)

Syntax

uihelper-ref.addItem ( [ format ] )
uihelper-ref.table-ref.addItem ( [ format ] )
uihelper-ref
A reference to a UIHelper instance. You can call the method on uihelper-ref if the JSDO associated with the instance has only a single table reference, and that table reference has a working record.
table-ref
A table reference that has a working on the JSDO associated with the UIHelper instance.
format
A String value specifying the fields displayed for the list item, overriding the format defined by setListView( ).

Example

The following code fragment adds an item to the list view associated with the working record, using the specified format, where dataSet is a JSDO that has the table reference, eCustomer:
dataSet = new progress.data.JSDO( 'dsCustomerOrder' );
uihelper = new progress.ui.UIHelper( { jsdo: dataSet } );
uihelper.eCustomer.addItem ( '{CustNum}<br>{Name}<br>{State}<br>{Country}' )

See also:

setListView( ) method, setItemTemplate( ) method