Hi., I am doing Edit,Update,Delete in gridview itself. I have controls like, Textbox,Dropdown,Rdiobutton inside EditItemTemplate.
All are working except radio button while editing, because i am binding values on the controls while editing using the below code.,
<asp:DropDownList ID="ddlAge" runat="server" AutoPostBack="false" SelectedValue='<%#Bind("Age") %>'>
<asp:ListItem Value="10" Text="10"></asp:ListItem>
<asp:ListItem Value="11" Text="11"></asp:ListItem>
<asp:ListItem Value="12" Text="12"></asp:ListItem>
<asp:ListItem Value="13" Text="13"></asp:ListItem>
<asp:ListItem Value="14" Text="14"></asp:ListItem>
<asp:ListItem Value="15" Text="15"></asp:ListItem>
</asp:DropDownList>
<asp:RadioButtonList ID="rbtGender" runat="server" SelectedValue='<%#Bind("Gender") %>'>
<asp:ListItem Value="M" Text="Male"></asp:ListItem>
<asp:ListItem Value="F" Text="FeMale"></asp:ListItem></asp:RadioButtonList>
But the SelectedValue property works for only dropdown, but not work for radiobutton, so it throws error like , does not contain this property.
How can i solve it.