Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

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

Links may not function; however, this content may be relevant to outdated versions of the product.

addListItem: Public JS API for control actions

Updated on April 6, 2017


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


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



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.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us