on 2006 Feb 28 10:50 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reena,
make nodeCustomer_DD node as non-singleton.
best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.