cancel
Showing results for 
Search instead for 
Did you mean: 

Use Drop Down by Key or any other UI?

Former Member
0 Kudos

Hi @,

In My case I am getting data in form of table where one column contains data which need to be displayed separately in the table like val1 val2 etc for the same table row. As per the requirement I have to populate these values in the same row but in Drop down so tht all the values can be accomodated within it.

I dont know how to embed and then populate drop down in Table. for each row?

Also I am thinking of any alternative solution/ better solution as the values in drop down will require user intervention to view all the details which I would like to avoid.

Any suggestions how we can achive this in better manner or atleast how to go for drop down in Table.?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First thing you don't have to populate drop down for each row in table like other elements you use in table. Here is my solution to such problem:

Create a value node: LineItem

create a value attribute: quantityDD(string type)

create a method called initializeQuantityDD() and put following code in it.


	ISimpleTypeModifiable quantityDD = wdThis.wdGetAPI().getContext().getModifiableTypeOf("LineItem.quantityDD");
	IModifiableSimpleValueSet values = quantityDD.getSVServices().getModifiableSimpleValueSet();
		
	values.clear();
	
	values.put("0", "Select Quantity");
	String qtyValue = "";
	for(int i=1; i<5; i++)
	{
		qtyValue = new Integer(i).toString();
		values.put(qtyValue , qtyValue );  
  	}

call initializeQuantityDD() method in wdDoInit() method so that it populates quantity drop down before displaying it.

Last thing you need to do is create table, define its datasource and add drop down element into column and map its property to LineItem.quantityDD.

I hope this will help.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

use DropDownByKey when you working with table UI.

Regards,

ramesh

Former Member
0 Kudos

Hi,

It's not that difficult and you could easily go for a dropdown. Just create a node within your table node which would hold the values to be displayed and bind the appropriate attribute of this sub-node to the texts property of your dropdown.

Use DropDownByIndex

Regards,

Murtuza