IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

GridView - Pager avec Update Panel


Sujet :

ASP.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Octobre 2005
    Messages
    132
    Détails du profil
    Informations forums :
    Inscription : Octobre 2005
    Messages : 132
    Par défaut GridView - Pager avec Update Panel
    Bonjour,
    je charge un gridview dans un update panel (ajax), tout se passe bien sauf l'utilisation du "pager" ; quand je clique sur un numéro de page, rien ne se passe... quelqu'un aurait il une idée s'il vous plait ?

    Merci d'avance

  2. #2
    Membre expérimenté
    Avatar de zooffy
    Homme Profil pro
    Chef de projet MOA
    Inscrit en
    Août 2004
    Messages
    3 895
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 55
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Chef de projet MOA
    Secteur : Bâtiment

    Informations forums :
    Inscription : Août 2004
    Messages : 3 895
    Par défaut
    Vérifie les Triggers de l'UP sur le bon évènement du PAger.

    Réponse rapide, jsute avant de aprtir en Week-end, donc.......

  3. #3
    Membre chevronné
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    312
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 312
    Par défaut
    fais voir ton code de déclaration de ton updPanel ( aspx ) stp.

  4. #4
    Membre confirmé
    Inscrit en
    Octobre 2005
    Messages
    132
    Détails du profil
    Informations forums :
    Inscription : Octobre 2005
    Messages : 132
    Par défaut
    Salut, voici le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
            <asp:UpdatePanel ID="UpdatePanel_boutons" runat="server">
                <ContentTemplate>
                    <asp:Panel ID="Panel1" runat="server" Height="24px" Width="960px">
                        <br />
                        <asp:Panel ID="Panel_boutons" runat="server" BorderStyle="Solid" BorderWidth="2px" Height="50px"
                            Width="944px">
                            <br />
                            <br />
                            &nbsp; &nbsp;<asp:Button ID="Button_all_demandes" runat="server" OnClick="Button_all_demandes_Click"
                            Text="Toutes Mes demandes" Font-Bold="False" Width="152px" BackColor="InactiveCaptionText" BorderStyle="Solid" BorderWidth="1px" />
                            &nbsp;<asp:Button ID="Button_demandes_en_attente" runat="server"
                                OnClick="Button_demandes_en_attente_Click" Text="Mes Demandes en attentes" Font-Bold="True" Width="184px" BackColor="InactiveCaptionText" BorderStyle="Solid" BorderWidth="1px" />
                            <asp:Button ID="Button_all_ddes" runat="server" OnClick="Button_all_ddes_Click" Text="Toutes Demandes" Width="136px" BackColor="InactiveCaptionText" BorderStyle="Solid" BorderWidth="1px" />
                            <asp:Button ID="Button_nouvelle_demande" runat="server" OnClick="Button_nouvelle_demande_Click"
                            Text="Nouvelle Demande" Font-Bold="True" Width="136px" BackColor="InactiveCaptionText" BorderStyle="Solid" BorderWidth="1px" />&nbsp;<asp:Button ID="Button_stats"
                                runat="server" OnClick="Button_stats_Click" Text="Statistiques" BackColor="InactiveCaptionText" BorderStyle="Solid" BorderWidth="1px" />&nbsp;
                            <asp:Button ID="Button_acceuil" runat="server" Text="Accueil" BackColor="LightCyan" BorderStyle="Solid" BorderWidth="1px" /><br />
                            &nbsp; &nbsp;&nbsp;
                            <asp:Label ID="Label4" runat="server" Font-Names="GE Inspira" Text="Classé par" Font-Italic="True"></asp:Label>
                        <asp:DropDownList ID="DropDownList_tri" runat="server" Width="136px">
                            <asp:ListItem Value=" date_demande">Date</asp:ListItem>
                            <asp:ListItem>Montant</asp:ListItem>
                            <asp:ListItem Value="convert(nvarchar,Nature)">Nature</asp:ListItem>
                        </asp:DropDownList>&nbsp;
                        <asp:CheckBox ID="CheckBox_tri" runat="server" Font-Names="GE Inspira" Font-Size="10pt"
                            Text="Décroissant" /><br />
                        </asp:Panel>
                        &nbsp; &nbsp;&nbsp;<br />
                        &nbsp; &nbsp;&nbsp;&nbsp;
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>

  5. #5
    Membre expérimenté
    Avatar de zooffy
    Homme Profil pro
    Chef de projet MOA
    Inscrit en
    Août 2004
    Messages
    3 895
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 55
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Chef de projet MOA
    Secteur : Bâtiment

    Informations forums :
    Inscription : Août 2004
    Messages : 3 895
    Par défaut
    Juste ne lisant ton code il manque deux truc par rapport à ton énoncé :
    - les triggers
    - le grid view

    Si tu les rajoutes, peut être que ça ira.

  6. #6
    Membre confirmé
    Inscrit en
    Octobre 2005
    Messages
    132
    Détails du profil
    Informations forums :
    Inscription : Octobre 2005
    Messages : 132
    Par défaut
    désolé !! je me suis trompé dUP ; voici le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateSelectButton="True" CellPadding="4" Font-Names="GE Inspira"
                        ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" DataKeyNames="ID" OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" AutoGenerateColumns="False" PageSize="5">
                        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                        <SelectedRowStyle BackColor="#C5BBAF" ForeColor="#333333" BorderColor="Red" BorderStyle="Double" BorderWidth="2px" Font-Bold="True" />
                        <PagerStyle BackColor="InactiveCaption" ForeColor="White" HorizontalAlign="Center" Font-Bold="True" Font-Size="Small" />
                        <HeaderStyle BackColor="InactiveCaption" Font-Bold="True" ForeColor="Black" />
                        <AlternatingRowStyle BackColor="White" />
                        <RowStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="InactiveCaptionText" />
                        <EditRowStyle BackColor="#7C6F57" />
                        <PagerSettings PageButtonCount="5" Position="Top" />
                    </asp:GridView>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
                    <asp:Label ID="Label_ligne" runat="server" Text="Label" Visible="False"></asp:Label>&nbsp;
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="PageIndexChanged" />
                    <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="PageIndexChanging" />
                </Triggers>
            </asp:UpdatePanel>

  7. #7
    Membre chevronné
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    312
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 312
    Par défaut
    Les triggers sont pas obligatoires, il prend par défaut les enfants de l'updatepanel comme triggers

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème avec Update Panel, Timer et Send Boutton
    Par youtpout978 dans le forum ASP.NET
    Réponses: 5
    Dernier message: 06/05/2012, 12h32
  2. Réponses: 0
    Dernier message: 04/02/2009, 11h16
  3. probleme gridview dans update panel
    Par hachdotnet dans le forum ASP.NET
    Réponses: 7
    Dernier message: 12/08/2008, 17h01
  4. [AJAX] performances fortement diminuées avec un Update panel (et IE)?
    Par cortex024 dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 28/06/2007, 12h40
  5. [C#] Travailler efficacement avec les panels dans une forme
    Par WwiloO dans le forum Windows Forms
    Réponses: 8
    Dernier message: 27/06/2005, 15h33

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo