cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByKey in Table

p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

I have a table with 4 columns. First 2 columns are DropDownByKey, the following 2 are InputeFields.

The first Column (DropDown1) is bound to a view context attribute of SimpleType with Enum values A,B,C,D.

The second Column (DropDown2) is bound to a view context attribute of SimpleType with Enum values 1,2,3,4.

The node to which these context attribute are attached has a cardinality of 0..n.

I cannot see the values in the dropdown in the table. Although they are visible when the dropdowns are attached outside the table (not in a column i.e. by themselves).

Any solutions? I think I am missing something simple - aren't I?

Thanks.

p256960

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Earlier posts on the topic -

Former Member
0 Kudos

As already posted you have to populate the data source node of the table to see table rows. A supply function could be useful.

Armin

p_2_5_6_9_6_0
Active Participant
0 Kudos

@Ramesh,

Yes the Table was created using a template. So there are already 4 columns in the table (see my first post for all the details)

@Alka

Yes - I have used the SimpleType for the respective context attrs.

Thanks.

p256960

Former Member
0 Kudos

Hi,

by using the apply template you added the Table only.

right now there is no elements in the table.

from my first post take code and do the neccessary changes to it.place this code in DoInit.

then you will be able to see the dropdown and input field in table row.

Regards,

ramesh

Former Member
0 Kudos

Hi,

Please check if the context attribute under the node, used in the table, is type of your Simpletype .

Regards,

Alka.

p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

Thanks to Prabu - although I am looking for a WDJ Solution.

@Ramesh,

I think you have provided the code to dynamically add a Dropdown to the Table.

But I need to know why the SimpleTypes Context values are not shown in the table dropdown but are visible when the dropdwon is not in the table.

Thanks.

p256960

Former Member
0 Kudos

Hi,

In table already any row is there ?

Regards,

ramesh

Former Member
0 Kudos

Hi,

in DoInit of view write the following code,

here "<name>Table" is the node with cardinality 0..n which is dataSource to Table UI.

IPrivate<name>View.I<name>TableNode i<name>TableNode = wdContext.node<name>Table();

IPrivate<name>View.I<name>TableElement i<name>TableElement = i<name>TableNode.createi<name>TableElement();

i<name>TableNode.addElement(i<name>TableElement);

Regards,

ramesh