Mik Cruz

Mik Cruz

  • NA
  • 3
  • 3.5k

Passing selected items in listbox to another form C#

Oct 15 2013 1:50 AM
Hello guys I'm new here.

My question is this. I have two forms. Form1 and Form2. Form1 contains listbox which have items on it added via another form by binding. Now what I want is when the users clicks an item on the listbox, Form2 opens which have textboxes containing the rest of information of the item that the user clicked. For example, when the customer clicks a name on the listbox, the age, address, and phone number shows on the textboxes on Form2. By the way the data are stored on a database on which is created on Visual studio itself. I'm already able to open the Form2 when the user clicks an item but I can't get to display the rest of the data. If you guys can help that would be great. 

Answers (3)