473,320 Members | 1,829 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,320 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 1043

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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.