The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
How do I display two columns values concatenated in the MulticolumnCombox.
Here is what I am doing right now:
this.multiColumnComboBox1.DataSource = dsUs;
this.multiColumnComboBox1.DisplayMember = dsUs.FirstNameColumn.ColumnName;
this.multiColumnComboBox1.ValueMember = dsUs.UserIDColumn.ColumnName;
Here is what I want(some thing like that):
this.multiColumnComboBox1.DisplayMember = dsUs.FirstNameColumn.ColumnName + "," + dsUs.LastNameColumn.ColumnName
Is this possible at all?
Thanks,
ADAdministrator Syncfusion Team October 27, 2005 06:12 PM UTC
Can''t you add another column to your DataTable that is the concatenation of the other two columns and then bind to this new column?
>Hi,
>How do I display two columns values concatenated in the MulticolumnCombox.
>
>Here is what I am doing right now:
>
>this.multiColumnComboBox1.DataSource = dsUs;
>this.multiColumnComboBox1.DisplayMember = dsUs.FirstNameColumn.ColumnName;
>this.multiColumnComboBox1.ValueMember = dsUs.UserIDColumn.ColumnName;
>
>Here is what I want(some thing like that):
>
>
>this.multiColumnComboBox1.DisplayMember = dsUs.FirstNameColumn.ColumnName + "," + dsUs.LastNameColumn.ColumnName
>
>Is this possible at all?
>
>Thanks,
>
>
ARAnupama Roy Syncfusion Team October 31, 2005 03:10 PM UTC
Hi Ramana,
Here is one way you can do this.
You can add a computed column to DataTable that is the concatenation of the first name and last name columns. Then for the MultiColumnComboBox, set the DisplayMember to be this new computed column so it shows the concatenated value. Below is a link to a Windows Forms FAQ entry showing how you can add a computed column to a datatable that is the datasource of a DataGrid, but the same techniques will add a computed column to the datasource of your MultiColumnComboBox column.
Let me know if you need more information, or if this does not work for you.
How do I use the DataColumn.Expression property to add a computed/combined column to my datagrid?
http://www.syncfusion.com/faq/winforms/search/904.asp
Regards,
Anu.