473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DisplayMember property of a ComboBox

Hi,

I would like to assign the DisplayMember property of a ComboBox
(Windows.Forms), in order that the ComboBox will show a concatenation
of two table columns. Is it possible?

Thanks,
David
Nov 15 '05 #1
1 2422
Hi David,

You might create a third DataColumn for your table, set its expression to
something like: "onecolumn + othercolumn" and set this column's name for
DisplayMember.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"David" <ke*******@yahoo.com> wrote in message
news:ce**************************@posting.google.c om...
Hi,

I would like to assign the DisplayMember property of a ComboBox
(Windows.Forms), in order that the ComboBox will show a concatenation
of two table columns. Is it possible?

Thanks,
David

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: cody | last post by:
I do not think it is good style to use these because you have to hardcode the propertynamed in your code as string literals. Wouldn't it be better to use delegates instead? ...
1
by: Irwin M. Fletcher | last post by:
ListBox DataSource DisplayMember Property Problems in C# I have a (single select) listbox with data and when I click on the list I can't get the right text selected. My listbox is setup...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
2
by: Sam | last post by:
This code does not work : With m_frmCtrl.cboMode .DataSource = m_dsCtrl.Tables(4) .ValueMember = "ModeID" .DisplayMember = "Description" .SelectedValue =...
6
by: Bill Nguyen | last post by:
How can I have the comboBox display valuemember in addition to the column specified in displaymember? For example, I want to display stationID 1999 (valuemember) and stationName such as "1999 -...
2
by: frank | last post by:
Hello All, I know this is a re-post, but I didn't get any bites on my last post. So here goes again: I have a listbox which is bound to a datatable. I have set the displaymember and valuemember...
0
by: Dundealing | last post by:
Hi, I have the following code to set the DataSource of a ComboBox to a certain table in an untyped DataSet, and I also want to set the DisplayMamaber of the ComboBox to a certain column: ...
6
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi I'm having problems getting the correct item to display in a bound combobox in my WinForms app. Using the following code: With Me.MyComboBox .ValueMember = "MyIdField" .DisplayMember =...
5
by: =?Utf-8?B?QmVu?= | last post by:
How would you add an item with its DisplayMember and ValueMember without binding to a datatable or dataview like: listbox.DisplayMember = "name"; listbox.ValueMember = "recid"; listbox.DataSource...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.