cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding DropDownByIndex make empty

sajith_p
Participant
0 Kudos

Hi

I am Sajith

I have a problem regarding DropDownByIndex.

I want to make empty DropDownByIndex initially. pls helpme

I want its code also.

regards

Sajith P

Enteg Infotech Pvt Ltd

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sajith,

U said u want to make empty DropDownByIndex initially.

If u mean to say, selection of dropdown to be empty in wdDoInit() u can write this

<b>wdContext.node<urNode>().setLeadSelection(-1);</b>

if u want to a dropdown without any values on intialization and populate it at any action.

create a method and addelements to ur node in that method and call this method on the required action

If u want to empty the list again in any other action u can invalidate the node using

wdContext.node<urNode>().invalidate();

Answers (3)

Answers (3)

roberto_tagliento
Active Contributor
0 Kudos

If you wanna select the EMPTY do:

wdContext.node$YOUR_NODE$().setLeadSelection(-1);

or

wdContext.node$YOUR_NODE$().setLeadSelection(IWDNode.NO_SELECTION);

while if you wanna delete all element and make dropdown empty, remove the node elements:

[code]

while (wdContext.node$YOUR_NODE$().size() > 0)

wdContext.node$YOUR_NODE$().removeElement(

wdContext.node$YOUR_NODE$().getElementAt(0)

)

[/code]

Former Member
0 Kudos

Hi,

For DDBI you using some node attribute Am I correct?

Find the size of the node suppose Iam giving node is RAMA

int size= wdContext.nodeRAMA().size;

for(int i=0;i < size; i++)

{

wdContext.nodeI_RAMA().setLeadSelection(-1);

}

Thanks,

Lohi.

Message was edited by:

Lohitha M

Former Member
0 Kudos

Hi,

Create a Context as follows

1. City(ValueNode)

zipcode (ValueAttrib)

Bind the dropdownByIndex UIElement to above valueattribute.

2. in wdInit() method

IPrivate<<ViewName>>.ICityElement ele=wdCOntext.createCitiElement();

ele.setZipCode("<<Value");

wdContext.nodeCity().addElement(ele;

Regards, Anilkumar