Bonjour ,
je voudrais suite a la selection d'un item du dropdown le gridview change .
le probleme c'est que le gridview affiche que les infos de la premiere valeur du dropdown.

j'aimerais savoir ou est l'erreur ,
merci d'avance .
voici mon code :
DropDownList :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
<table>
<tr>
    <td style="height: 49px"><asp:Label ID="Label1" runat="server" >Etablissement</asp:Label>
    </td>
    <td style="height: 49px">
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="NOM_ETABL" DataValueField="CD_ETAB" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" />
    </td>
    <td>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionAREF %>" SelectCommand="getPrescolaireEtablissement" SelectCommandType="StoredProcedure" />
    </td>
</tr>
</table>
GridView:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">          
</asp:GridView>
 
<div id="footer">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionAREF %>" SelectCommand="getPreInscriptionPublic" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList1" Name="CD_ETAB" PropertyName="SelectedValue" Type="String" />
        <asp:Parameter Name="afficher" Type="Boolean" DefaultValue="true" />
    </SelectParameters>
</asp:SqlDataSource>
</div>