ive been trying to experiment on dropdownlist in a grid..i cannot get
anything to work...i tried to have some code in the editcommand using
the Findcontrol but its really frustrating ...
anybody is kind enough to help out..
TIA
Here's my example:
<asp:TemplateColumn SortExpression="STE" HeaderText="State">
<ItemTemplate>
<asp:Label Runat="server" Text='<%#
((SortedList)Session["stateTypes"])[(((System.Data.DataRowView)Container.DataItem)["STE"])]
%>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp

ropDownList runat="server" DataSource='<%#
((SortedList)Session["stateTypes"]) %>' SelectedIndex='<%#
((SortedList)Session["stateTypes"]).IndexOfKey(((System.Data.DataRowView)Container.DataItem)["STE"])
%>' DataValueField="Key" DataTextField="Value" ID="ddlState">
</asp

ropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
and i have something like this in my codebehind when the page loads
up.
stateTypes = new SortedList();
stateTypes.Add("","");
stateTypes.Add("W","Waiting");
stateTypes.Add("H","On Hold");
stateTypes.Add("I","In Process");
Session["stateTypes"] = stateTypes;
hope this helps.
-Adam