Skip to Content
0
Former Member
Aug 01, 2005 at 02:18 PM

Dropdown list on table

163 Views

I would like to create a table which one of it's columns is DropDownByKey list.

The construction of my context is

-> MonthsOfYear Type Node cardinality 0..n

->-> DDLNode Type Node cardinality 1..n

->-> ABCVal Type String

->-> MonthName Type String

I implement the wdDoInit method as following:

public void wdDoInit()

{

//@@begin wdDoInit()

String[] monthNames = new String []

{

"January", "February", "March", "April",

"May", "June", "July", "August",

"September", "October", "November", "December",

};

ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("MonthsOfYear.DDLNode.ABCVal");

IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();

values.put("0","A");

values.put("1","B");

values.put("2","C");

values.put("3","D");

values.put("4","E");

values.put("5","F");

values.put("6","G");

List monthsOfYear = new ArrayList();

for (int i = 0; i < monthNames.length; ++i)

{

IPrivateTableTestView.IDDLNodeElement ddlElement = wdContext.createDDLNodeElement();

IPrivateTableTestView.IMonthsOfYearElement monthElement = wdContext.createMonthsOfYearElement();

monthElement.setMonthName(monthNames<i>);

wdContext.nodeMonthsOfYear().addElement(monthElement);

wdContext.nodeMonthsOfYear().nodeDDLNode().addElement(ddlElement);

wdContext.currentDDLNodeElement().setABCVal("0");

}

//@@end

}

The problem is that after running the application I can see the selected value of dropdown list only on first row of my table. The dropdownlists on other rows are look like empty and I can see the values of these dropdown lists only when I choose the relevant row on the table.

Thanks in advanced for any help

Yoel