473,467 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to display two columns sequently in combobox using display member property?

6 New Member
I am using a combobox.. and I want to display two columns combobox using the diplay member property...for example I have a table sam and it has two columns A and B .


following are details of column A

A

---

1

2

3



following are the details of column B


B

---

4

5

6




Now I want to display them into combobox as following...


1

2

3

4

5

6
Dec 17 '10 #1
1 2969
bentleyw
32 New Member
I'm not sure where you're getting your data. But assuming that this is data from a database and you're querying it, then you could write a UNION query with a SELECT for each column. If you need to do it client side, then you could build a new DataTable with one column and populate it either iteratively or using LINQ. Then the DisplayMember of the ComboBox would be the column name from the table, and set the table as the DataSource.
Dec 18 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Pradeep | last post by:
I have defined a member property called "int Total Emp" under the dimension team and defined calculated member under measures using this property called "total # emp" as .properties("int Total...
0
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
0
by: Hiroyuki Tanaka | last post by:
Hi All, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to...
4
by: C.E.O. Gargantua | last post by:
I want to have a member property that is common to a set of classes. I designed an abstract class, but when I try to add it to the abstract class, it flags an error in VS.NET. The design (...
7
by: charliewest | last post by:
Using .Net CF, i have created a 2 dimension ArrayList, and "binded" this list to a ComboBox control using the "DataSource" property. I have set the DisplaySource and ValueMember properties as well....
2
by: Hanumanth Reddy | last post by:
Any one could help how to bind two table field values into combobox display member property. I mean i have two fields in a table. One is states description and another is states codes.I want to...
3
by: natin | last post by:
Hi How do i display a date field using databind.eval ?
1
by: kishh | last post by:
hi i want to display multiple columns in combobox , i want in c# coding can any one help me as soon as possible with regards kishore
0
by: Amit | last post by:
Hi All, Can any one write me the Code to sort datagridviewcomboboxcolumn according to display member property. By default is it sorted according to value member but I want to sort according to...
4
by: ApexData | last post by:
Hello Is there any way to get my table bound ComboBox to display the Yes/No field with a check instead of Yes/No ? Greg
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.