Hi, I have a gridview populated by a objectdatasource and in that i have a dropdownlist that populates with a sqldatasource when i 'edit'. Im having trouble getting the selectedvalue of the dll when i click 'update'. it looks like it repops the ddl before the gridview_update calls.
-------------------------------------
Dim ddlcontrol As DropDownList = GridView1.Rows.Item(E.RowIndex).FindControl("ddlAssignTo")
Dim select As String = ddlcontrol.SelectedItem.Value
-------------------------------------
<asp:TemplateField HeaderText="CurrentAssignment">
<ItemTemplate>
<%#Eval("CurrentAssignment")%>
</ItemTemplate>
<EditItemTemplate>
<aspropDownList ID="ddlAssignTo" runat="server" Width="152px" DataSourceID="SqlDataSource4" DataTextField="windowslogin" DataValueField="windowslogin" AutoPostBack="True"></aspropDownList>
</EditItemTemplate>
</asp:TemplateField>
I havent been able to bind the selectedvalue since im grabbing from 2 dbs and theyre unrelated.
-------------------------------------
Dim ddlcontrol As DropDownList = GridView1.Rows.Item(E.RowIndex).FindControl("ddlAssignTo")
Dim select As String = ddlcontrol.SelectedItem.Value
-------------------------------------
<asp:TemplateField HeaderText="CurrentAssignment">
<ItemTemplate>
<%#Eval("CurrentAssignment")%>
</ItemTemplate>
<EditItemTemplate>
<aspropDownList ID="ddlAssignTo" runat="server" Width="152px" DataSourceID="SqlDataSource4" DataTextField="windowslogin" DataValueField="windowslogin" AutoPostBack="True"></aspropDownList>
</EditItemTemplate>
</asp:TemplateField>
I havent been able to bind the selectedvalue since im grabbing from 2 dbs and theyre unrelated.