I usually create a function that sets after it is populated. The Page_Load()
is fine (with !Page.IsPostBack() for normal ops where the data does not
change after population). Your app may not give you that option.
--
Gregory A. Beamer
*************************************************
Think Outside the Box!
*************************************************
"John Smith" <jo********@microsoft.com> wrote in message
news:7f********************@news.siol.net...
I have this DataGrid:
<asp:datagrid id="dg1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="SM">
<ItemTemplate>
<asp:Label id="Label2" runat="server" Text='<%#
Container.DataItem("SM") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlSM" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="ddlSM_SelectedIndexChanged ">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
Inside which event it would be the best to set DropDownList's "Selected"
property?