1 Replies - 5005 Views - Last Post: 10 August 2008 - 08:30 PM Rate Topic: -----

#1 kueh82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 08-August 08

Combo Box can't reset

Posted 10 August 2008 - 07:59 PM

i want to add new data but my combo box cannot reset....

i use this code to reset, but i got error

cbonMaterial.DataSource = Nothing
cbonMaterial.Text = ""
cbonMaterial.Items.Clear()

the error is:

An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll

Additional information: Cannot modify the Items collection when the DataSource property is set.


any others suggestion.....

This post has been edited by kueh82: 10 August 2008 - 08:44 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Combo Box can't reset

#2 jacobjordan  Icon User is offline

  • class Me : Perfection
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Re: Combo Box can't reset

Posted 10 August 2008 - 08:30 PM

cbonMaterial.Items.Clear() should clear the combobox. Please elaborate and post any related code so we can see exactly what is happening.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1