Lier deux RadioButtonList entre elles
Bonjour, j'ai deux RadioButtonList définies par :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <asp:RadioButtonList ID="RadioButtonList3" runat="server" Width="100%" OnSelectedIndexChanged="ListeAffichageIndexChanged">
<asp:ListItem Text="Numéro"></asp:ListItem>
<asp:ListItem Text="Libellé"></asp:ListItem>
<asp:ListItem Text="Description"></asp:ListItem>
</asp:RadioButtonList>
<asp:RadioButtonList ID="RadioButtonList4" runat="server" Width="100%">
<asp:ListItem Value="Detection" Text="Détection"></asp:ListItem>
<asp:ListItem Value="Analyse" Text="Analyse"></asp:ListItem>
<asp:ListItem Value="Traitement" Text="Traitement"></asp:ListItem>
<asp:ListItem Value="Clôture" Text="Clôture"></asp:ListItem>
</asp:RadioButtonList> |
Ce que je voudrais, c'est en cochant une puce de RadioButtonList3 (n'importe laquelle), cela sélectionne toutes les puces de RadioButtonList4.
J'ai essayé avec ça mais ça ne marche pas :
Code:
1 2 3 4 5
| protected void ListeAffichageIndexChanged(object sender, EventArgs e)
{
RadioButtonList4.SelectedItem.Value = "Detection";
} |
Si quelqu'un peut me dire d'où vient le problème ?
Merci.