Overview:
This is VS 08 windows application using a .mdf database that was created in VS and is inside the project itself.
2 forms, first form has a dropdown list that is populated from my ClientName column in my Client table table inside my clients.mdf database that I created in VS.
2nd form has text fields that all the data that is associated with the dropdown list's selected item.
So if you choose ex1 from form1 then form2 will have all of ex1's remainging data.
The problem, I'm trying to take the selected item along with the associated data and store it into my ClientAccount Class but I can not figure out how to do that. I know I should populate the dropdown in the form load but I need to be doing the rest inside the selected index change on the drop down.
Form1 Form Load
This is VS 08 windows application using a .mdf database that was created in VS and is inside the project itself.
2 forms, first form has a dropdown list that is populated from my ClientName column in my Client table table inside my clients.mdf database that I created in VS.
2nd form has text fields that all the data that is associated with the dropdown list's selected item.
So if you choose ex1 from form1 then form2 will have all of ex1's remainging data.
The problem, I'm trying to take the selected item along with the associated data and store it into my ClientAccount Class but I can not figure out how to do that. I know I should populate the dropdown in the form load but I need to be doing the rest inside the selected index change on the drop down.
Form1 Form Load
VB.NET:
'Set up and filld the DataSet
AClientDataSet = New ClientDataSet
AClientsTableAdapter = New ClientDataSetTableAdapters.ClientTableAdapter
AClientsTableAdapter.Fill(AClientDataSet.Client)
Try
'Set up the binding source.
AClientsBindingSource = New BindingSource
With AClientsBindingSource
.DataSource = Me.AClientDataSet
.DataMember = "Client"
' Get the correct count of the rows in the DataSet.
.MoveLast()
.MoveFirst()
End With
'Bind the controls
With Me.cboClient
.DataSource = AClientsBindingSource
.DisplayMember = "ClientName"
.DataBindings.Add("text", Me.AClientsBindingSource, "ClientName", False, DataSourceUpdateMode.Never)
End With
Catch ex As Exception
MessageBox.Show("Data Error: " & ex.Message)
End Try