I have a combobox created and a table where I have first and last name both as columns. I want my columnbox to list the names of the first and last names put together and I'm not sure how to progress. I tried changing my DisplayMember to "First Name" but that only displays the first name when I run the program, I want BOTH.
This code was automatically added to my .vb file when I changed the displaymember to first name only:
Private Sub ComboBox3_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged End Sub
Is there something I must add here? I'll stay here diligently until I get an answer and answer questions. . . . . . . . . . . . . . ALSO WHEN I Used a binding script to update my tables immediately, can I use a modified one to update the combobox immediately?
Private Sub BindGridSalespeople() Dim constring As String = "server=classified;database=classified" Using con As New SqlConnection(constring) Using cmd As New SqlCommand("SELECT * FROM Salespeople", con) cmd.CommandType = CommandType.Text Using sda As New SqlDataAdapter(cmd) Using dt As New DataTable() sda.Fill(dt) DataGridView1.DataSource = dt End Using End Using End Using End Using End Sub