removing item in dropdownlist

G

Guest

I find tons of info on adding, but what about removing an item dynamically?

I'm cycling through the list and removing users that have special rights.
I've tried things like:

ddcontactnames.Items.Remove(userdata("CONTACT_ID"))

but how do I pick the value on the item and remove it?

thanx.
 
G

Guest

Hi Chris,
You can remove using this :

ddl.Items.Remove(ddl.Items.FindByValue("2"));

P.S : If this post helped you, please click 'Yes' on top to close the
thread. Thanks
HTHs...
R. Thomas
 
G

Guest

thanx!

R. Thomas said:
Hi Chris,
You can remove using this :

ddl.Items.Remove(ddl.Items.FindByValue("2"));

P.S : If this post helped you, please click 'Yes' on top to close the
thread. Thanks
HTHs...
R. Thomas
 
Joined
May 28, 2008
Messages
11
Reaction score
0
fill dropdownlist2 on selected index change of dropdownlist1

i hav 3 dropdownlists called ddl1,ddl2,ddl3.
on selected index change of ddl1 i am calling function of ddl2_fill(),and on selected index change of ddl2i am callin ddl3_fill() function. ddl1 is filling on page _load.
first time it works fine but my problem is when i change item in ddl1,the ddl2 ,ddl3 remains containing their item with previous selection
what i do that every time when i change selection of ddl1 the item in ddl2,ddl3 show items related to selected item of ddl1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top