This content has been archived and is no longer being maintained.

Table of Contents


addListItem: Public JS API for control actions


Add a new item to a grid or a repeating dynamic layout


var options ={<br />
target: pega.api.ui.constants.GRID/ pega.api.ui.constants.RDL,<br />
position:"sPosition",<br />
event: eventObject,<br />
detailFlowAction:'flowActionName',<br />
template:"templateName",<br />
dataPage:"dataPageName",<br />
dataPageResultsClass:'className'<br />



This API accepts a JavaScript object which can have the following key-values:

  • target: A string that identifies if the target is a grid, tree grid, tree or a repeating dynamic layout. Valid values:
    • pega.api.ui.constants.GRID: when the target is Grid, Tree or Tree grid
    • pega.api.ui.constants.RDL: when the target is a Repeating Dynamic Layout
  • position: Optional. A string to identify where the new row should be added. Valid values:
    • When target=grid, valid values are after or before. When value is after it adds the new item after the currently selected row, when the value is before it adds the new item before the currently selected row.
    • When target=RDL, valid values are first or last. When the value is first it adds the new item to the top of the list, and when the value is last it adds the new item to the end of the list.
  • event: The event refers to a DOM eventObject. The eventObject will be used to identify the grid
  • detailFlowAction: Optional. Identifies the flow action that would display the UI for the new item. This is not required for the grid, but is required when the target is ‘RDL’
  • template: Optional. Required, when the target is RDL (repeating dynamic layout). Provide the name of the modal template that would be used to display the detailFlowAction. The default value is pyNextGenGridModalTemplate.
  • dataPage: Optional. Provide the name of the dataPage associated with the Grid or repeating dynamic layout. When not set, the active grid or repeating dynamic layout will be identified using the event object.
  • dataPageResultsClass: This is a string which specifies dataPage results class name. This is required only when dataPage is set.

Published February 15, 2017 — Updated April 6, 2017

100% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.