cancel
Showing results for 
Search instead for 
Did you mean: 

Using DropDownByIndex in Table

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (4)

Answers (4)

monalisa_biswal
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi All,

Thanks a lot for all your help and code snippets. I extremely happy that it solved my problem...

Thanks a lot once again Experts...!'

Regards,

R.Jude Silvester.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

This message was moderated.