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.