acess ddl in edit template of gridview?

sharc

Member
Joined
Jul 11, 2005
Messages
11
Programming Experience
3-5
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>
<asp:DropDownList ID="ddlRole" runat="server" DataSourceID="dsRoles"
DataTextField="role" DataValueField="role">
</asp:DropDownList>
</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?
 
Back
Top