473,394 Members | 1,693 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,394 software developers and data experts.

datatextfield in combo box

I have a combo box that has in it a value. It's an unbound combo box that
gets populated based on SQL code being executed in the codebehind file.

What it displays now is a salesrep name. When you click on it, it selects
the correct field (repname, which is a code that is different than the
firstname, lastname that is displayed in the combo box).

I need to add something to the combo box in order to display the company
name in a format like the following:

(company) RepFirstname RepLastname

I don't want anything to change on the value that's being selected
(repcode), but just want to make the combo box look differently.

The SQL I have that gives me the appropriate field & formatting of it is:

select '(' + summarytable.ssalesgroup + ') ' as salesgroup1,
salesreptable.sDescription, salesreptable.srepcode from salesreptable inner
join summarytable on summarytable.ssalesrepcode = salesreptable.srepcode
and summarytable.ssalesgroup = salesreptable.ssalesgroup
group by summarytable.ssalesgroup, salesreptable.sDescription,
salesreptable.srepcode order by summarytable.ssalesgroup,
salesreptable.srepcode

The where clause gets populated based on some other combo box selections.

How do I get the (company) repdescription to display without changing what's
selected (which is sufficient in the select code). I only need to display
the company name in order to assist the users who work with a number of reps
and companies.

Thanks,

SC
Nov 18 '05 #1
0 1049

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

Similar topics

1
by: Jason Heine | last post by:
Hello, I am have a web service which I pull a dataTable and then fill a listBox with the information. On the ListBox1.DataTextField = "myColumn"; I need to attempt the following: DateTime...
1
by: NBB | last post by:
I can't figure this one out. Here's the situation, should be pretty for the pros in here. I have a ListBox that is populated with the DataTextField and DataValueField flags of the DataSet....
0
by: | last post by:
I have a combo box that has in it a value. It's an unbound combo box that gets populated based on SQL code being executed in the codebehind file. What it displays now is a salesrep name. When...
2
by: Angela | last post by:
Hi everyone, Is it possible to bind the DataTextField property to two values from a database. I would like the text from column("book") and the text from column("code") to appear in the...
0
by: Gawel | last post by:
I can do this: DataTextField="User" but this raise an error that User does not have Name property. DataTextField="User.Name" How can I force ASP.NET to allow me to use this second statement?...
1
by: Sam | last post by:
I want to create dropdownlist where DataTextField and DataValueField are extract from table gldate. Example Dropdownlist -> Jan-2005 -> Feb-2005 ... ... -> Dec-2005
2
by: mimi | last post by:
Is there a way to set hyperlink's datatextfield bind to more than one field for ex: <asp:HyperLinkColumn DataNavigateUrlField="CustomerID" DataNavigateUrlFormatString="Customer.aspx?ID={0}"...
3
by: Nathan Sokalski | last post by:
I have a ListBox control which I am using with databinding. However, the text that I want to be displayed is a combination of two fields (in this case, first and last names). What do I enter as the...
5
by: Mark Rae | last post by:
Hi, Here's one just for my own interest - I know how to add ListItems programatically, and how to concatenate fields in SQL queries... But, is there any way to specify anything other than a...
1
by: Eric Layman | last post by:
Hi I am attempting to bind data to a dropdownlist. Currently the below code will bind a persons last name just find using the datatextfield. What I would like to do though, is also be able to...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
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...

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.