removing item in dropdownlist

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Jan 12, 2005.

  1. 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.
    =?Utf-8?B?Q2hyaXM=?=, Jan 12, 2005
    #1
    1. Advertising

  2. 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

    "Chris" wrote:

    > 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.
    =?Utf-8?B?Ui4gVGhvbWFzLCBha2EgWHRyZW1lLk5ldA==?=, Jan 12, 2005
    #2
    1. Advertising

  3. thanx!

    "R. Thomas, aka Xtreme.Net" wrote:

    > 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
    >
    > "Chris" wrote:
    >
    > > 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.
    =?Utf-8?B?Q2hyaXM=?=, Jan 12, 2005
    #3
  4. =?Utf-8?B?Q2hyaXM=?=

    swati254

    Joined:
    May 28, 2008
    Messages:
    11
    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
    swati254, Jun 9, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RA
    Replies:
    0
    Views:
    4,567
  2. Svenn Bjerkem

    Removing an item from a QListView in PyQt

    Svenn Bjerkem, Apr 11, 2006, in forum: Python
    Replies:
    2
    Views:
    835
    David Boddie
    Apr 11, 2006
  3. Miguel E.

    List operation: Removing an item

    Miguel E., Apr 16, 2006, in forum: Python
    Replies:
    8
    Views:
    311
    Miguel E
    Apr 17, 2006
  4. Chris  Chiasson
    Replies:
    6
    Views:
    596
    Richard Tobin
    Nov 14, 2006
  5. deanfamily
    Replies:
    2
    Views:
    264
    deanfamily
    Dec 8, 2005
Loading...

Share This Page