on 10-06-2008 6:03 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use DropDownByKey when you working with table UI.
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.