We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

MultiColumnComboBox

Thread ID:

Created:

Updated:

Platform:

Replies:

36319 Oct 26,2005 01:42 PM Oct 31,2005 10:10 AM Windows Forms 2
loading
Tags: Tools
Ramana
Asked On October 26, 2005 01:42 PM

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,

Administrator [Syncfusion]
Replied On October 27, 2005 02:12 PM

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, > >

Anupama Roy [Syncfusion]
Replied On October 31, 2005 10:10 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;