I have a DropDownList assigned to a column in a DataGrid, but cannot find a way to bind my collection to it.
I used the example from
They do it by putting code on the HTML page and assigning the DataSource to the DropDown. I am trying to keep my code in the CodeBehind page.
How do I get a reference to the DropDown from the CodeBehind page?
Here is the code for the DropDownList:
The only thing worse than being alone, is wishing you were.
I used the example from
They do it by putting code on the HTML page and assigning the DataSource to the DropDown. I am trying to keep my code in the CodeBehind page.
How do I get a reference to the DropDown from the CodeBehind page?
Here is the code for the DropDownList:
Code:
<asp:TemplateColumn HeaderText="Panel Type">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "DisplayInfo") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" id="ddPanelTypes"
DataValueField="ConfigPanelGID"
DataTextField="DispalyName"
DataSource="???" />
/>
</EditItemTemplate>
</asp:TemplateColumn>
The only thing worse than being alone, is wishing you were.