cancel
Showing results for 
Search instead for 
Did you mean: 

RowRepeator and Dropdown as RowElelemt

Former Member
0 Kudos

Hi Experts,

ist it possible in 7.1/7.2 to add a dropdown as a RowElement of RowRepeator?

I added a dropdown but when adding new lines I can only open the dropdown in the first row. The context I used is a value-node with child-node for dropdown content.

Regards, Dorothea

Accepted Solutions (1)

Accepted Solutions (1)

ravindra_bollapalli2
Active Contributor
0 Kudos

hi Dorothea

it is posible for rowrepeater in 7.1 in ehp1

refert this blog

https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0849a4b-07c9-2b10-db83-c83fea06c563&overrid...

let me know u need any further information

ravindra

Answers (1)

Answers (1)

Former Member
0 Kudos

It's not officially supported but it works. Example:


Context
+ Rows (node, c=0:n)
   + Items (node, c=0:n, s=0:1, singleton=false)
      + text (string)

RowRepeater.dataSource = Rows
RowRepeater.rowElement = DropDownByIndex1
DropDownByIndex1.texts = Rows/Items/@text

Assign an action "ItemSelected" to the "onSelect" event of the drop-down list, add a parameter "row" of type IRowsElement. Map event parameter "nodeElement" to action parameter "row". Then you can find out in the action handler which item in which row has been selected:


void onItemSelectedAction(..., IRowsElement row)
{
  int selectedItemIndex = row.nodeItems().getLeadSelection();
  if ( selectedItemIndex  == IWDNode.NO_SELECTION )
  {
    wdComponentAPI.getMessageManager().reportSuccess("No item selected at row " + row.index());
  }
  else
  {
    wdComponentAPI.getMessageManager().reportSuccess("Item " + selectedItemIndex  + " selected at row " + row.index());
  }
}

Armin