on 07-23-2009 12:19 PM
Hi ALL,
I want to create a table in WD that should have dropdown in one of its column (i.e. each row of that particular column should have a unique dropdown ) , but i am unable to bind the data to the dropdown control.
Can anyone please help me to solve this issue.
Thanks in Advance.
Regards,
Jude.
Hi Jude
RootUIElmentContainer>insert table>Apply Template >Select node and its attributes>next-->select particular field and change the textview to DropDownByKey -->Finish.
Then it automatically binds the node value to the prtoperty od dropdown
Check this thread
Armin explains with code
Thanks
Tulasi Palnati
Edited by: Tulasi Palnati on Jul 23, 2009 1:35 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Jude,
For creating drop down by index you need to create non singleton node(Set singleton =false) under table node.
e.g.
Table
-attr1
-attr2
Child -singlton = false
-key
-text
Bind text property of dropdown by index to text attribute of child node.
for(int i =0; i <5;i++)
{
//Create Table Row
IPrivate<View>.ITableElement parentelement = wdContext.nodeTable().createTableElement();
wdContext.nodeTable().addElement(parentelement);
parentelement.setAttr1("Abc"+i);
//Create Dropdown values
for(int j=0; j<3;j++)
{
IPrivate<View>.IChildNode childNode =parentelement.nodeChild();
IPrivate<View>.IChildElement childelement = childNode.createChildElement();
childNode.addElement(childelement);
childelement.setKey("Key"+i);
childelement.setText("Text"+i);
}
}
The above code snippet will create 5 table rows with dropdown in every row.
Dropdown will have 3 values.
Hope this helps!
Monalisa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I Guess you should go for dynammic UI creation and binding the UI to node dynamically.
Search for dynamic programming in SDN.
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Steps:
1)Set the Node dropdown of property singleton to false.
2)Add the dropdown element to the table node
Using the code
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,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.