Expand my Community achievements bar.

Dropdownlist dynamically populating

Avatar

Level 2

HI,

I have an dropdown which has an custom entry. After user enter some item in that dropdown. The user click on add instance button where whole page gets added but in the next page that dropdown get empty.

How can I get the values present even though when user click on add instance. Please help

Thanks in advance.

1 Reply

Avatar

Level 10

It gets empty probably because it is empty initially.. so you have to repopulate it each time this drop down list is created...

Each time you click on the add instance button you should add the code to add the items in the new drop down list.

When you get the drop down list values from the inital object, always get the one in the 0 instance

and when you insert the list values inside the new drop down list use the count instance - 1

you can add items in the drop down list using

dropdownlist1.addItem(strValue, strValue);