473,399 Members | 3,106 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,399 software developers and data experts.

Dropdownlist with multiple data values?

Hope I'm posting this in the right place.

Has anyone encountered the need to have more than one datavaluefield?

At present, I'm returning two columns, a StateID and a StateDesc and
they are being put into the datavaluefield and datatextfield
respectively.

I could REALLY do with binding another column to the dropdownlist as I
require additional information about these states...

Does anyone have any ideas?

Jun 29 '06 #1
2 8098
Hi,

You could always combine the value field (the one that is not visible) with
the two or more columns you need.

You would have to use some javascript code to split it back.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<ke*****@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...
Hope I'm posting this in the right place.

Has anyone encountered the need to have more than one datavaluefield?

At present, I'm returning two columns, a StateID and a StateDesc and
they are being put into the datavaluefield and datatextfield
respectively.

I could REALLY do with binding another column to the dropdownlist as I
require additional information about these states...

Does anyone have any ideas?

Jun 29 '06 #2
Yeah, at the moment I have the following options:

1) Extend the control - too much hassle, too little time.
2) Use pipe delimited list - as you suggested, but I'm reluctant to do
that due to the other processing I'm doing.
3) Call the database each time the dropdownlist index is changed - this
is what i'm doing now, which isn't particularly ideal.
4) Store the information in a hashtable within the cache - i'm also a
bit reluctant to do this as it contravenes the way i've designed it in
a way.

I was hoping heh someone might have some magic solution!

Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

You could always combine the value field (the one that is not visible) with
the two or more columns you need.

You would have to use some javascript code to split it back.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<ke*****@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...
Hope I'm posting this in the right place.

Has anyone encountered the need to have more than one datavaluefield?

At present, I'm returning two columns, a StateID and a StateDesc and
they are being put into the datavaluefield and datatextfield
respectively.

I could REALLY do with binding another column to the dropdownlist as I
require additional information about these states...

Does anyone have any ideas?


Jun 29 '06 #3

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

Similar topics

1
by: DC Gringo | last post by:
I'm having such a problem with this DropDownList in a user control that is posting back and throwing an error: System.Web.HttpException: A DropDownList cannot have multiple items selected ...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
5
by: Bryan Ax | last post by:
I have a page that has two copies of the same control in it. The control is: BorrowerControl the two references to it in the page are bControl1 cobControl1
10
by: tshad | last post by:
I have a dropdownbox object: <asp:DropDownList ID="ddlQuestionType" runat="server"> <asp:ListItem Value="MS" Text="Multiple Single" /> <asp:ListItem Value="MM" Text="Multiple Multiple" />...
10
by: dhnriverside | last post by:
Hi guys Still having a problem with this dropdownlist. Basically, I've got 4. The first 2 work fine, then my code crashes on the 3rd. ddlEndTimeHour.Items.FindByValue(endTime).Selected =...
1
by: Schultz | last post by:
Is there anyway to include values from 2 (or more) separate db columns into a single DropDownList using VB.NET 03? I would like the visible Data to be in the following format: lname, fname...
1
by: Schultz | last post by:
I posted a message about this a few weeks ago, and my question is how to show values from Multiple DB Columns in a DropDownList (VB.NET 03 and Access 2k). The format works, however it repeats the...
8
by: utterberg | last post by:
Hi I'm adding two dropdownlist in my webform by clicking a button. I fill the first dropdown with some values from my DB and the other one when I choose from the first dropdown. But since theese...
10
by: ads | last post by:
hi, after binding the dropdownlist to a datasource, ive experience this error "Cannot have multiple items selected in a dropdownlist" after using the code:...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
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?
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.