How to give a comboBox's DisplayMember 2 or more columns?

Hi: How to give a comboBox's DisplayMember 2 or more columns? Like: comboBox.DisplayMember = "CustomerId" + "CustomerName"; comboBox.ValueMember = "CustomerId";

2 Replies

SK Shardool Karnik December 17, 2002 05:15 PM UTC

Use a DataView and combine the two as IdName in the sql select statement .... there is no other way that i know of .... > Hi: > How to give a comboBox's DisplayMember 2 or more columns? > Like: > comboBox.DisplayMember = "CustomerId" + "CustomerName"; > comboBox.ValueMember = "CustomerId";


RO Rohit July 7, 2003 07:35 AM UTC

Sorry to post a question on question but what if I want more than 1 value member.. Like in my case, I have 3 columns that form a composite key of a colimn.. So I want all 3 to be value member for a column of another column.. How do I achieve that?

Loader.
Up arrow icon