function prevRow(gridId) {
    const gridOptions = crossbeamsGridStore.getGrid(gridId);
    const selectedNodes = gridOptions.api.getSelectedNodes();
    let selectedNode;
    if (selectedNodes && selectedNodes.length > 0) {
      selectedNode = selectedNodes[0];
    } else {
      selectedNode = gridOptions.api.getDisplayedRowAtIndex(gridOptions.api.getFirstDisplayedRow());
    }
    let found = false;
    let lastNode = null;
    gridOptions.api.forEachNodeAfterFilterAndSort((node, index) => {
      if (!node.group) {
        lastNode = node;
      }
      if (!found && index === selectedNode.rowIndex - 1) {
        if (!node.group) {
          lastNode = node;
        }
        if (lastNode !== null) {
          found = true;
          lastNode.setSelected(true);
          crossbeamsUtils.closePopupDialog();
          crossbeamsGridEvents.viewSelectedRow(gridId);
          gridOptions.api.ensureNodeVisible(lastNode, 'top');
        }
      }
    });
  }
/**
   * Select the previous row in the grid while viewing in a popup form
   * @param {string} gridId - the id of the grid div element.
   * @returns {void}
   */
Select the previous row in the grid while viewing in a popup form
@param {string} gridId - the id of the grid div element.
@returns {void}
Select the previous row in the grid while viewing in a popup form @param { string } gridId - the id of the grid div element . @returns { void }
function prevRow(gridId) {
    const gridOptions = crossbeamsGridStore.getGrid(gridId);
    const selectedNodes = gridOptions.api.getSelectedNodes();
    let selectedNode;
    if (selectedNodes && selectedNodes.length > 0) {
      selectedNode = selectedNodes[0];
    } else {
      selectedNode = gridOptions.api.getDisplayedRowAtIndex(gridOptions.api.getFirstDisplayedRow());
    }
    let found = false;
    let lastNode = null;
    gridOptions.api.forEachNodeAfterFilterAndSort((node, index) => {
      if (!node.group) {
        lastNode = node;
      }
      if (!found && index === selectedNode.rowIndex - 1) {
        if (!node.group) {
          lastNode = node;
        }
        if (lastNode !== null) {
          found = true;
          lastNode.setSelected(true);
          crossbeamsUtils.closePopupDialog();
          crossbeamsGridEvents.viewSelectedRow(gridId);
          gridOptions.api.ensureNodeVisible(lastNode, 'top');
        }
      }
    });
  }
function prevRow ( gridId ) { const gridOptions = crossbeamsGridStore . getGrid ( gridId ) ; const selectedNodes = gridOptions . api . getSelectedNodes ( ) ; let selectedNode ; if ( selectedNodes && selectedNodes . length > 0 ) { selectedNode = selectedNodes [ 0 ] ; } else { selectedNode = gridOptions . api . getDisplayedRowAtIndex ( gridOptions . api . getFirstDisplayedRow ( ) ) ; } let found = false ; let lastNode = null ; gridOptions . api . forEachNodeAfterFilterAndSort ( ( node , index ) => { if ( ! node . group ) { lastNode = node ; } if ( ! found && index === selectedNode . rowIndex - 1 ) { if ( ! node . group ) { lastNode = node ; } if ( lastNode !== null ) { found = true ; lastNode . setSelected ( true ) ; crossbeamsUtils . closePopupDialog ( ) ; crossbeamsGridEvents . viewSelectedRow ( gridId ) ; gridOptions . api . ensureNodeVisible ( lastNode , 'top' ) ; } } } ) ; }
Select the previous row in the grid while viewing in a popup form
 @param {string} gridId - the id of the grid div element.
Select the previous row in the grid while viewing in a popup form @param { string } gridId - the id of the grid div element .