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

How have dropdown refer to Gridview?

ASP.NET 2.0....

Building a shopping cart application.

2 tables: Categories and Products

I have a Gridview representing Products. When the admin selects a row a
DetailsView is populated. In my DetailsView I have a dropdownlist which
pulls Categories from the Categories table. I want to auto-select the
correct Category for the Product that has been selected in the Gridview.
How do I do this?

Thanks.
Feb 6 '06 #1
2 1585
If you're pulling the Category ID for the Product from your data source,
then you can use this as your SelectedValue for your dropdownlist in the
DetailsView. So, in either your DataBound or ItemCreated event for the
DetailsView, you can set the SelectedValue for your dropdownlist. Is this
what you're looking for?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"VB Programmer" <do**@emailme.com> wrote in message
news:uw*************@TK2MSFTNGP09.phx.gbl...
ASP.NET 2.0....

Building a shopping cart application.

2 tables: Categories and Products

I have a Gridview representing Products. When the admin selects a row a
DetailsView is populated. In my DetailsView I have a dropdownlist which
pulls Categories from the Categories table. I want to auto-select the
correct Category for the Product that has been selected in the Gridview.
How do I do this?

Thanks.

Feb 7 '06 #2
Thanks Christopher!

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:uj***************@TK2MSFTNGP12.phx.gbl...
If you're pulling the Category ID for the Product from your data source,
then you can use this as your SelectedValue for your dropdownlist in the
DetailsView. So, in either your DataBound or ItemCreated event for the
DetailsView, you can set the SelectedValue for your dropdownlist. Is this
what you're looking for?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"VB Programmer" <do**@emailme.com> wrote in message
news:uw*************@TK2MSFTNGP09.phx.gbl...
ASP.NET 2.0....

Building a shopping cart application.

2 tables: Categories and Products

I have a Gridview representing Products. When the admin selects a row a
DetailsView is populated. In my DetailsView I have a dropdownlist which
pulls Categories from the Categories table. I want to auto-select the
correct Category for the Product that has been selected in the Gridview.
How do I do this?

Thanks.


Feb 7 '06 #3

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

Similar topics

1
by: sck10 | last post by:
Hello, I am using the following in a GridView. Currently, I am using a dropdown that pulls the Name of the person, given the Employee ID. I am doing this in both the ItemTemplate and the...
4
by: Dabbler | last post by:
I have two tables I'm editing in a Gridview. The VANS table contains a key to the other LESSOR table. I would like to use a dropdown list to select the LessorId value while displaying the Lessor...
3
by: Advertis | last post by:
Is there a way to populate a dropdown in a GridView with the next x years? I am using a GridView to display data from a SQL table One of the fields is a Year. I want to have the dropdown list not...
1
by: William Youngman | last post by:
I have a gridview displaying data and would like to use the AJAX dropdown extender so that when the user clicks on a record a dropdown menu will display providing the user with a menu of selections...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
0
by: progman417 | last post by:
I have a gridview with a dropdown list in an EditItemTemplate. I haven't set a width for the columns, so that they dynamically size according to the data displayed. When it goes into edit...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a generic list of data list <typelistcategory; listcategory = new list <type>; I also have a dropdown box that I have put into a template column of a gridview. I was able to populate...
1
by: murugavelmsc | last post by:
hi, in vs2005, i have a control of gridview and dropdown. in dropdown list have a item of table header which i configured in gridview. In Dropdown box, i selected one header means , it select the...
5
by: Kalkin | last post by:
Hi Is it possible to change the data source of a dropdown list in a gridview from another dropdown list selected index changed method in the same gridview? for example I have a dropdown that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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,...

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.