[DataBind] - ArrayList to ListBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thesti
    New Member
    • Nov 2007
    • 144

    [DataBind] - ArrayList to ListBox

    hi,

    can i bind the data in an Arraylist to a Listbox? so that, when an item is added or removed from the ArrayList, the listbox will reflect it immediately.


    thank you.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    All you to do is when you removed the item rebind to the new array at the same time.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Windows application:
      If the listbox is truely bound to an object, changing the object should automatically change the contents on the control.

      Web application:
      you will need to call the DataBind() function to "re-bind" to the datasource.

      Comment

      Working...