For the life of me (and I'm sure it's really simple), I can't access the value in the editItemTemplate of my gridview.
I've got a gridview called gv1, with the following code:
<asp:TemplateField HeaderText="role" SortExpression="role">
<EditItemTemplate>
<aspropDownList ID="ddlRole" runat="server" DataSourceID="dsRoles"
DataTextField="role" DataValueField="role">
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblRole" runat="server" Text='<%# Bind("role") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
and after clicking edit, on click of the update button it hits here:
Protected Sub gv1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gv1.RowUpdating
but how do I access the ddl value to perform the update?
I just can't seem to figure this out - please can someone enlighten me?
I've got a gridview called gv1, with the following code:
<asp:TemplateField HeaderText="role" SortExpression="role">
<EditItemTemplate>
<aspropDownList ID="ddlRole" runat="server" DataSourceID="dsRoles"
DataTextField="role" DataValueField="role">
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblRole" runat="server" Text='<%# Bind("role") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
and after clicking edit, on click of the update button it hits here:
Protected Sub gv1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gv1.RowUpdating
but how do I access the ddl value to perform the update?
I just can't seem to figure this out - please can someone enlighten me?