Do I expect correctly?
Well, it's not happening. And it doesn't matter whether it's an HTML or a
web control. The type declaration is not being generated automatically. If
I add the declaration manually, it fools the compiler but not the runtime.
I think there may be something important here that I do not understand. Can
anyone tell me what I need to read about in order to debug this situation?
Thanks.
<itemTemplate>
<asp:dropdownlist id="x" runat="server" />
</itemTemplate>
you can't simply manipulate X like you would any other control. Which "X"
do you want? The one in row1, row2, row3??
Typically, you hook into the grids/list/repeater's ItemDataBound event,
which fires for each row being bound:
e.Item <-- the row being bound. From that, you can access the dropdownlist
via a FindControl
DropDownList x = (DropDownList)e.Item.FindControl("x");
take a look at:
http://openmymind.net/MyArticles.aspx?documentId=8
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"JebBushell" <jebbushell AT yahoo DOT com> wrote in message
news:E7CF0F5B-5AEA-4967...@microsoft.com...
Here's your answer implemented:
dgPumps.Items[dgPumps.EditItemIndex].Cells[5].Controls.Add(ddlBrand);
where ddlBrand is a local instance of HtmlSelect that has previously
been databound.
Works great. Thanks again.