none
Clear a combobox RRS feed

  • Question

  • Hi
     
    I have a combobox in my project, there gets is data from a table
    this works fine, but later i have another combobox and here i want to
    clear the first combox , before the come some new date here

    i have try with combo_konsulent.items.clear

    But then i get an error
    can some one help here


    Regards

    alvin

    ALK
    Wednesday, August 20, 2008 7:53 PM

Answers

  •  combo_konsulent.DataSource = Nothing 
     
     

    Should clear all items and allow you to add new items.

     

    • Marked as answer by Alvin Kuiper Sunday, August 24, 2008 12:22 PM
    Wednesday, August 20, 2008 10:25 PM

All replies

  •  combo_konsulent.DataSource = Nothing 
     
     

    Should clear all items and allow you to add new items.

     

    • Marked as answer by Alvin Kuiper Sunday, August 24, 2008 12:22 PM
    Wednesday, August 20, 2008 10:25 PM
  • thanks

    But then again how do i make new date in here

    Whats happen is that i have one combobox = konsulent
    here there are some names from a table, then the client
    choose a name , i have then another combobox there show items
    only for the name in the first combobox, so far so good, but when the client have
    make a choise in the second combobox, it shall effekt on the first combobox.

    Like :

    First I have 20 names i combo1
    then i choose a name
    then i have 4 items i combo2
    after my choise in combo2
    i shal only have 4 names in combo1

    Just now i have 8 names because the show me the names 2 times



    Alvin

    ALK
    Thursday, August 21, 2008 5:49 AM
  • Well that depends on which 4 names you want to see in combo1 in the end. Show us your code and I'm sure we'll fix it. (Also if the 4 names are subset of the original 20 names, I suggest you use RowFilter property.)
    Thursday, August 21, 2008 10:28 AM