on 07-05-2006 10:43 AM
Hello,
I have created a table with some elements and a drowndown. My problem is if I choose an entry in the drowndown menu in one row and select another row, evertime time the new chosen dropdown entry will overwrite all the other choosen entrys in the other dropdowns. How can I fix that? If I work with local simple types it works, but in my case I get the entrys from a context node mapped to an external RFC interface.
Any ideas?
Regards,
Frank
Hi
You code should be like this.
for (int i=0; i<3; i++){
IPrivateKontierungView.IPo_Items_CopyElement Text = wdContext.createPo_Items_CopyElement();
Text.setShort_Text_Copy("Test1"+i);
wdContext.nodePo_Items_Copy().addElement(Text);
for (int j=0; j<4; j++) {
IPrivateKontierungView.IT_Coinnen_CopyElement Dropdown = wdContext.createT_Coinnen_CopyElement();
Dropdown.setAufnr("Test2"+j);
Text.nodeT_Coinnen_Copy().addElement(Dropdown);
}
}
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
True.You have to populate the DropDown Node for each element of the TableNode.
The code above is the exact thing that needs to be done.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hm, in my case, I get three rows but the entries for the drowdown are only shown in the first row, the dropdowns of the other two rows are empty. Here is the source code I use. The Node Po_Items_Copy is the table node and T_Coinnen_Copy the dropdown node:
for (int i=0; i<3; i++){
IPrivateKontierungView.IPo_Items_CopyElement Text = wdContext.createPo_Items_CopyElement();
Text.setShort_Text_Copy("Test1"+i);
wdContext.nodePo_Items_Copy().addElement(Text);
for (int j=0; j<4; j++) {
IPrivateKontierungView.IT_Coinnen_CopyElement Dropdown = wdContext.createT_Coinnen_CopyElement();
Dropdown.setAufnr("Test2"+j);
wdContext.nodeT_Coinnen_Copy().addElement(Dropdown);
}
}
Regards,
Frank
Hi
Assuming you have following node structure for the table.
TableNode
|_
DropDownNode(Node for the DropDown in table)
Please make sure that the DropDownNode is Non singleton.
This should solve your problem.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi to all,
it is exactly the same structure you have described. I have created a table node and in this node another node for the dropdown. But I did not change the singleton attribute before, so I changed it to false
Now the problem changes that only the dropdown box of the first row in the table shows the entrys, the other dropdowns are empty.
Any other ideas? (by the way, I use drowndown by index, must I use dropdown by key?).
Regards,
Frank
Hi,
Use the below code to add elements to Dropdown inside table.
Use dropdownByindex
Steps:
1)Set the Node dropdown of property singleton to false.
2)Add the dropdown element to the table node
Using the code with bold lines below..
IPrivate<ViewName>.ITableElement Text = wdContext.createTableElement();
Text.set<Att>("aaaa");
//Ading elements below the table node
<b>wdContext.nodeTable.addElement(Text);</b>
for (int i=0; i<4; i++) {
IDropdownElement drop = wdContext.createDropdownElement();
drop.set<dropAtt>("test " +i);
//Ading values to dropdown and intrun to table node
<b>Text .nodeDropdown.addElement(drop);</b>
}
Regards,
Vijayakhanna Raman
Hi Frank
After you've changed singleton to FALSE check that DropDownNode is filled in for each elements of TableNode. It seems the node is filled only for the first TableNode element right now.
You can also use DropDownByKey in the table. In the case 'selectedKey' property of the control should be bound to some attribute from TableNode and the simple type of the attribute must have an enumeration. However, list of entries would be the same for all drop-downs in all the rows.
BR
Sergei
Sounds like you are using a singleton instead a non-singleton. The effect is that in all rows the value of the lead selected element is shown.
Can you post the context structure and the data binding of the drop-down list?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.