Dear all,
I'm trying to bind an added data column to a Combobox.
Therefore I'm adding a column to the datatable I'm using which is made by the concatenation of two fields. Unfortunately, as the two fields are of type NChar(50) the result is that in the combobox the two fields appear with a lot of empty spaces in between.
Here below the code I'm using:
For example, let's name field Nome is "Filippo" and Cognome is "Rossi", the result in the combobox is:Code:Dim Fullname As New DataColumn() Fullname.DataType = System.Type.GetType("System.Object") Fullname.ColumnName = "Fullname" CTO_DataSet.Tbl_CTOAbilità.Columns.Add("FullName", GetType(String), "Nome + Cognome") Cmb1.DataSource = CTO_DataSet.Tbl_CTOAbilità Cmb1.DisplayMember = "Fullname" Cmb1.ValueMember = "ID"
"Filippo Rossi".
How can I delete the spaces?
Thanks for the support,
A.




Reply With Quote
