UPDATE: I've managed to get the text aligned by using a fixed font (eg: courier) but now I still have the trailing spaces in the combo although the SQL is using VARCHAR which is supposed to hide the trailing spaces.
In the FORM_LOAD I tried without trim, which gives me the following result: (has extra spaces after first and last name)
http://www.vinewoodstudios.com/vbnet-font
Here's the query I use in FORM_LOAD to get this:
Me.VINEWOODSTUDIOS_DataSet.tbl_clients.Columns.Add("FullName", GetType(String), "client_id +' ' + client_first_name + client_last_name")
Me.Tbl_clientsTableAdapter.Fill(Me.VINEWOODSTUDIOS_DataSet.tbl_clients)
ComboBox_clients.DisplayMember = "FullName"
I'm not sure how to implement the TRIM function in the Query. I tried LTRIM and RTRIM but this doesn't help: (example of RTRIM: )
Me.VINEWOODSTUDIOS_DataSet.tbl_clients.Columns.Add("FullName", GetType(String), "client_id +' ' + RTRIM(client_first_name) + RTRIM(client_last_name)")
Me.Tbl_clientsTableAdapter.Fill(Me.VINEWOODSTUDIOS_DataSet.tbl_clients)
ComboBox_clients.DisplayMember = "FullName"
|