cancel
Showing results for 
Search instead for 
Did you mean: 

DropDown in a Table

Former Member
0 Kudos
260

Hi,

I have a table (bound to a model node 'li_Allocations') in which one of the columns is a DropDownbyIndex. I have bound this column to a value node 'Customer_DD'.

I am trying to set the default value of the dropdown column to the value in the li_alloc table for each of the rows. I have used the following code.

for (int i=0; i<wdContext.nodeLi_Allocations().size();i++)

{

IPublicSarniaAllocationComp.ICustomer_DDElement cust_ele= wdContext.createCustomer_DDElement();

cust_ele.setCustomer(wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i).getCustomer());

wdContext.nodeCustomer_DD().addElement(cust_ele);

}

But, only my first row is showing the default value. the remaining rows display a blank column.

Can anyone let me know what the problem is?

Thanks and Regards,

Reena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Reena,

Assuming 'Customer_DD' is a non-singleton node under the model node 'li_Allocations' (else you cannot do this) :

for (int i=0; i<wdContext.nodeLi_Allocations().size();i++)

{

IPublicSarniaAllocationComp.ICustomer_DDElement cust_ele= wdContext.createCustomer_DDElement();

cust_ele.setCustomer(wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i).getCustomer());

wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i).nodeCustomer_DD().addElement(cust_ele);

/* The previous two steps create and add an element to customer_DD node with the same customer as the parentnode/*

// setting the lead selection

int n = wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i).nodeCustomer_DD().size();

wdContext.nodeLi_Allocations().getLi_AllocationsElementAt(i).nodeCustomer_DD().setLeadSelection(n-1);

}

Hope this helps,

Best Regards,

Nibu.

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Reena,

make nodeCustomer_DD node as non-singleton.

best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

I have already set it to non-singleton.

Still no use.

Thanks in Advance,

Reena