on 06-25-2008 12:22 PM
Hi
i have dropdownbyindex with label Academic Year, now i need to populate values in to it in the form of 2000-2001,2001-2002.....2049-2050.can u tell me the required code to populate the values(from 2000-2001 to 2049-2050)
thanks
kishore
Hi
Use Surender's code with nominal change
// current
ele.setCtx_va_year(i+"-"+i+1);
// Use Instead
ele.setCtx_va_year(i+"-"+(i+1) );
In first one output will be 2000-20011, 2001-20021 ....
Mandeep Virk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Iam assuming that u have bound ur dropDownByIndex to a
string type context.
Create a node say ctx_vn_year and create a value attribute
say ctx_va_year into it .Bind ctx_va_year to ur
dropDownByIndex ,use following code to fulfill ur
requirement.
IPrivateMyappView.ICtx_vn_yearElement ele;
wdContext.nodeCtx_vn_year().invalidate();
for(int i =2000;i<2050;i++)
{
ele=wdContext.nodeCtx_vn_year().createCtx_vn_yearElement();
ele.setCtx_va_year(i+"-"+(i+1));
wdContext.nodeCtx_vn_year().addElement(ele);
}
Regards
Surender Dahiya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you read the documentation (Javadoc)? If yes, what is still unclear?
Armin
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 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.