cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get dropdown inside a table?

Former Member
0 Kudos

Hi,

Please let me know how i can get dropdown inside a table. I can fill a drop down that is stand alone, but i dont know how to fill a dropdown inside a table for each row. Please help.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Uday, that example helped me.

I tried the same using other method as well. I created a separate node with cardinality 1:n. Then, i wrote a code to fill data to that node.

I mapped the dropdown in the table to this new node and it worked fine for me. Dont know if this way of doing it is right, but the output is as desired.

Please give your suggestions if you find some problem in this way. One problem i am aware of is that in this case, all the dropdowns will have same values.

uday_gubbala2
Active Contributor
0 Kudos

Hi Utkarsh,

There is nothing wrong in creating an entirely different node instead of a subnode. It does actually depend up on the kind of functionality you intend to achieve. If you want the dropdowns in each row to have different valuesets then you need to go with the subnode approach. However if you dont need any such functionality and just want to display 1 of your columns as a dropdown then you can as well create a new node instead of a subnode. I had just gave you that example coz it would be easier for you to try go through a good working example to understand the concept.

Regards,

Uday

uday_gubbala2
Active Contributor
0 Kudos

Hi Utkarsh,

You need to change the "cell editor" of your tables column to a DropDownByIndex or DropDownByKey to get a dropdown inside a table. When you right click on your Table under the ROOTUIELEMENTCONTAINER & say "Create Binding" you get a popup displayed. Within this popup you select the context node with which you want to bind your table with. Here you can change the "Cell Editor" property for the desired column from the default value of TextView to DropDownByIndex or DropDownByKey. This would result in all the cells of that column to be displayed as a dropdown.

Just as an additional pointer... Since you want to display dropdowns within a table you would be better off trying to make use of a DropDownByIndex. When using dropdown lists in table columns, using the DropDownByIndex view element is inevitable if selection lists with different values are to be displayed for different rows. The DropDownByKey view element cannot be used

here, because the value set is always valid for all elements of a context node. For a table, this characteristic applies to every row and would therefore result in the same contents being displayed in every row.

Regards,

Uday

Former Member
0 Kudos

HI

1) Under your main Context Node create a Child Node for your drop down list box in a Key Value pair format. {Create your node in component controller}

2) For your Child node create a Supply Function fill in the drop down list based based on respective record of your table.

3) Create a Table UI and change the UI element as the Drop down by index for your desired column.

Regards

Chaitanya.A

Former Member
0 Kudos

Hi,

I have created a child node with singleton property as NONE.

Eg, say parent node is Node1.(cardinality 1:n)

inside this parent node:

1. Child node is Node1_1.(singleton as none, cardinality 1:n)

1.1 Inside Node1_1: attribute: C1.

2. Attribute: A1

3. Attribute: A3

please guide me what code i should write to fill Node1_1.

Thanks in advance

uday_gubbala2
Active Contributor
0 Kudos

Hi Utkarsh,

You can populate the data within a supply function. Try check the standard Web Dynpro Component DEMO_VARIABLE_DROPDOWN. Here they have 2 nodes TABLE_SOURCE (parent node) & URLS (child node). They have assigned a supply function S_TABLE_SOURCE for the parent node TABLE_SOURCE. Within this particular method they are coding the logic to populate the values for both the nodes. The key point to be noted is that here within that supply function they are filling the URLS node with data in such a way that the dropdown in each row contains a different valueset. Try test the DEMO_VARIABLE_DROPDOWN component & see the values that the dropdowns under the URLs column have in different rows.

Regards,

Uday