473,320 Members | 1,936 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.

dropdownlist in a datalist

Can anyone direct me to a tutorial on how to set up a dropdownlist in a
datalist? Each dropdownlist in the datalist needs to pull back different
information based on the datalist item it resides in.

I am not having much luck finding any information on this.

Any help is appreciated.

Thanks,
Brent
Nov 18 '05 #1
4 5343

http://authors.aspalliance.com/wisem...px?id=AD012402

Here's a great place that has a ton of info and links specific to datagrids.
http://www.datagridgirl.com

- Chad

"Brent Burkart" <Br***********@wvmb.com> wrote in message
news:ON**************@TK2MSFTNGP10.phx.gbl...
Can anyone direct me to a tutorial on how to set up a dropdownlist in a
datalist? Each dropdownlist in the datalist needs to pull back different
information based on the datalist item it resides in.

I am not having much luck finding any information on this.

Any help is appreciated.

Thanks,
Brent

Nov 18 '05 #2

http://authors.aspalliance.com/wisem...px?id=AD012402

Here's a great place that has a ton of info and links specific to datagrids.
http://www.datagridgirl.com

- Chad

"Brent Burkart" <Br***********@wvmb.com> wrote in message
news:ON**************@TK2MSFTNGP10.phx.gbl...
Can anyone direct me to a tutorial on how to set up a dropdownlist in a
datalist? Each dropdownlist in the datalist needs to pull back different
information based on the datalist item it resides in.

I am not having much luck finding any information on this.

Any help is appreciated.

Thanks,
Brent

Nov 18 '05 #3
Hi Brent,

What you need to do is set up a public/protected method that returns an IEnumerable data source, such as a DataSet, DataTable, etc.

The input parameters can be whatever you need to make the data distinct.

Then, in your DataList, just use the following code:

<asp:DropDownList runat="server" id="DropDownList1" DataSource='<%# GetMyData(<ADD INPUT PARAMETERS>) %>' DataMember="<IF NEEDED>" DataTextField="Field1" DataValueField="Field2" />

Matt Hawley, MCAD .NET
http://www.eworldui.net

Can anyone direct me to a tutorial on how to set up a dropdownlist in a
datalist? Each dropdownlist in the datalist needs to pull back different
information based on the datalist item it resides in.

I am not having much luck finding any information on this.

Any help is appreciated.

Thanks,
Brent

Nov 18 '05 #4
Hi Brent,

What you need to do is set up a public/protected method that returns an IEnumerable data source, such as a DataSet, DataTable, etc.

The input parameters can be whatever you need to make the data distinct.

Then, in your DataList, just use the following code:

<asp:DropDownList runat="server" id="DropDownList1" DataSource='<%# GetMyData(<ADD INPUT PARAMETERS>) %>' DataMember="<IF NEEDED>" DataTextField="Field1" DataValueField="Field2" />

Matt Hawley, MCAD .NET
http://www.eworldui.net

Can anyone direct me to a tutorial on how to set up a dropdownlist in a
datalist? Each dropdownlist in the datalist needs to pull back different
information based on the datalist item it resides in.

I am not having much luck finding any information on this.

Any help is appreciated.

Thanks,
Brent

Nov 18 '05 #5

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

Similar topics

2
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
0
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
1
by: Antonio D'Ottavio | last post by:
Good morning, I've a problem with a dropdownlist located inside any row of a datalist, I fill both datalist and dropdownlist at runtime, the problem is with the dropdownlist infact using the event...
0
by: Ashish Sharma | last post by:
I have a drop down list inside a data list on a form like this : <asp:DataList ID="DataList1" runat="server" EnableViewState="False"> <ItemTemplate> <asp:Label ID="lblname" Runat="server"...
2
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
3
by: sling blade | last post by:
Hi, I have a dropdownlist in my DataList control and I am trying to set the SelectedItem property of the dropdownlist so when the datalist displays the user will see the text in the dropdownlist...
1
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control,...
4
by: Chris Kettenbach | last post by:
Good morning all, I am sure this has been asked but I did not see anything. I have a datalist control. In the edititemtemplate I have a dropdownlist. I know on the itemdatabound event is where I...
2
by: Kevin | last post by:
Hi I need to get the "ItemId" from the selected value of the DropDownList in a DataList, but i don't known where tu put the <%# DataBinder.Eval(Container.DataItem, "ItemId"), because if I try to...
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.