Results 1 to 3 of 3

Thread: Can this be done?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Posts
    382

    Can this be done?

    Is it possible in vb.net to bind a control with a data source other than a database? I dought it's possible but I would like to be able to bind text boxes to variables

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You can bind to any object that implements IList or an interface that derives from IList. An example is the Arraylist which you can bind to.

    VB Code:
    1. Dim itms() As String = {"Edneeis", "Cander", "MartinLiss", "Serge"}
    2.         Dim al As New ArrayList(itms)
    3.         ComboBox1.DataSource = al
    4.         'if binding to a class you have to set the property to bind to
    5.         'ComboBox1.DisplayMember="MyProperty"

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Posts
    382
    Ah very nice.. thanks Edneeis..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width