How to Add to Bounded ComboBox

  • 10 years ago



    How do you add new items, during runtime, to a comboBox bounded to a database.  The


    this.comboBox1.Items.Add(“<Select Something>”);


    this.comboBox1.Items.Insert (“<Select Somgthing>”); don’t work.  Which end up giving this error:



    any thoughts?

    Thank you.

  • 10 years ago

    You can't add an Item directly in a control which is bounded to a database.

    First you should add that record in the database, and after that refresh the dataset to which your control is getting data.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”