Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. binding data in an array to a listbox

binding data in an array to a listbox

Scheduled Pinned Locked Moved Visual Basic
wpfwcfdata-structureshelplearning
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Coreo
    wrote on last edited by
    #1

    hey all, Im really new to this all so please bear with me. I've basically just written a module with a main function that creates an array of data (this is fine) and open a form with a listbox (courslist) that i want to populate with the values stored in the array (course). For some reason (i know im missing somethin silly) the form app crashes with An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll Additional information: Value cannot be null. Here's the call i make to bind the data. Any help would be greatly appreciated f1.courselist.DataSource() = course f1.Show() Cheers,

    S 1 Reply Last reply
    0
    • C Coreo

      hey all, Im really new to this all so please bear with me. I've basically just written a module with a main function that creates an array of data (this is fine) and open a form with a listbox (courslist) that i want to populate with the values stored in the array (course). For some reason (i know im missing somethin silly) the form app crashes with An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll Additional information: Value cannot be null. Here's the call i make to bind the data. Any help would be greatly appreciated f1.courselist.DataSource() = course f1.Show() Cheers,

      S Offline
      S Offline
      sumit21
      wrote on last edited by
      #2

      datasource is used i database (oledb connections) use this funda dim i as integer for i=0 to course.lenght-1 f1.courselist.items.add(course(i)) next f1.show() hope this will works

      C 1 Reply Last reply
      0
      • S sumit21

        datasource is used i database (oledb connections) use this funda dim i as integer for i=0 to course.lenght-1 f1.courselist.items.add(course(i)) next f1.show() hope this will works

        C Offline
        C Offline
        Coreo
        wrote on last edited by
        #3

        unfortunately that didnt seem to do it... but i'll keep pluggin away, thanks

        S 1 Reply Last reply
        0
        • C Coreo

          unfortunately that didnt seem to do it... but i'll keep pluggin away, thanks

          S Offline
          S Offline
          sumit21
          wrote on last edited by
          #4

          tell te exception or error u r getting

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups