cancel
Showing results for 
Search instead for 
Did you mean: 

list box with years

Former Member
0 Kudos

Friends,

does anybody have idea or code snippet for the following.

1.I want a listbox with years(from 1945 to 2006)

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Baskaran,

Make one context value node "year" in view context.

Make one context value attribute "yearValue" under this value node.

Add DropdownbyIndex UI in the layout. Bind above create attribute to this dropdownByIndex.

Write following code to populate the list.

for(i=1945;i<=2006;i++)

{

IView<view name>.IYearElement year_ele = wdcontext.nodeYear().createYearElement();

year_ele.setYearvalue(i);

wdcontext.nodeYear().addYearElement(year_ele);

}

Regards,

Bhavik

Former Member
0 Kudos

Thanks Bhavik,

It is indeed a good solution for me.

Answers (0)