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 :

collapsiblePanel extender s'ouvre et se referme


Sujet :

ASP.NET

  1. #1
    Membre éclairé
    Inscrit en
    Septembre 2007
    Messages
    1 137
    Détails du profil
    Informations personnelles :
    Âge : 40

    Informations forums :
    Inscription : Septembre 2007
    Messages : 1 137
    Points : 707
    Points
    707
    Par défaut collapsiblePanel extender s'ouvre et se referme
    Bonjour, j'ai un petit souci, j'utilise un collapsiblePanel extender quand je clique il s'ouvre bien, par contre au bout de 2-3 secondes, il se referme.

    Quelqu'un a-t-il une idée sur ce probleme?

    Merci

  2. #2
    Expert confirmé
    Avatar de Nicolas Esprit
    Homme Profil pro
    Consultant en technologies
    Inscrit en
    Février 2010
    Messages
    1 467
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Consultant en technologies
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 1 467
    Points : 4 066
    Points
    4 066
    Par défaut
    Bonjour,

    Sans bout de code, difficile de t'en dire plus. Ce n'est pas le comportement normal du contrôle, donc poste-nous le code en question.

  3. #3
    Membre éclairé
    Inscrit en
    Septembre 2007
    Messages
    1 137
    Détails du profil
    Informations personnelles :
    Âge : 40

    Informations forums :
    Inscription : Septembre 2007
    Messages : 1 137
    Points : 707
    Points
    707
    Par défaut
    Bonjour voilá le bout de 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
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
     
    <asp:UpdatePanel ID="uppComments" runat="server">
            <ContentTemplate>
                <asp:Panel ID="PanelComments" runat="server" CssClass="PanelComments">
                    <div style="float: right;">
                        <asp:LinkButton ID="lkbShowAll" Text="Alle Kommentare" CssClass="button_ShowAll"
                            runat="server" ToolTip="Alle Kommentare zu diesem Foc anzeigen" Visible="false"
                            OnClick="lkbShowAll_Click" />
                    </div>
                    <asp:Panel runat="server" ID="PanelKeinComment" Visible="false">
                        <asp:Label runat="server" ID="lblKeinComment" Text="Noch kein Kommentar vorhanden."></asp:Label>
                    </asp:Panel>
                    <asp:GridView ID="grdComments" runat="server" GridLines="None" DataSourceID="sdsComments"
                        DataKeyNames="CommentID" AutoGenerateColumns="False" BorderWidth="0" CellPadding="0"
                        CellSpacing="0" Style="margin-bottom: 5px; margin-top: -19px;" CssClass="" OnRowCommand="grdComments_RowCommand">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Panel ID="PanelCommentHead" runat="server">
                                        <div class="CommentHead">
                                            <div style="float: left; width: 500px;">
                                                <asp:LinkButton ID="lkbCriteria" runat="server" Text='<%# Eval("Criteria") %>' CssClass="CommentCritera"
                                                    ToolTip='<%# "Alle Kommentare zu "+Eval("Criteria")+" anzeigen" %>' CommandArgument='<%#Eval("CriteriaID") %>'
                                                    CommandName="ShowCriteriaComment" /></div>
                                            <div style="float: right;">
                                                <asp:LinkButton ID="lkbCriteriaList" runat="server" Text="List" CssClass="SubCommentlink"
                                                    ToolTip='<%# "Alle Kommentare zu "+Eval("Criteria")+" anzeigen" %>' OnClick="lkbCriteriaList_Click"
                                                    Visible="false" />
                                                <asp:Label ID="lblCriteriaID" runat="server" Text='<%#Eval("CriteriaID") %>' Visible="false" /></div>
                                            <div style="float: left; width: 500px;">
                                                <asp:Label ID="lblCommentDetails" runat="server" Text='<%# GetUsername(Eval("Username").ToString()) %>'
                                                    CssClass="CommentCriteraDetails" />
                                                <asp:Label ID="lblCommentDetails2" runat="server" Text='<%# " schrieb am "+Eval("Created").ToString().Remove(16) %>' /></div>
                                            <div style="float: left; width: 500px;">
                                                "<asp:Label ID="lblComment" runat="server" Text='<%#""+ Eval("Comment")+"" %>' CssClass="CommentText" />"</div>
                                            <div style="float: left; width: 500px;">
                                                <asp:LinkButton ID="lkbSubComment" runat="server" Text='<%# GetSubCom(Eval("SubCounts").ToString())%>'
                                                    ToolTip="Hier kannst Du Deine Meinung zu diesem Kommentar abgeben" CssClass="SubCommentlink" />
                                            </div>
                                            <div class="SubComment">
                                                <asp:Panel ID="PanelSubComment" runat="server">
                                                    <div style="margin: 0 5px 5px 5px; padding-bottom: 5px;">
                                                        <asp:GridView ID="grdSubComments" runat="server" GridLines="None" DataSourceID="sdsSubComments"
                                                            DataKeyNames="ID" AutoGenerateColumns="False" BorderWidth="0" CellPadding="0"
                                                            CellSpacing="0" Style="margin-bottom: 5px; margin-top: -19px;" CssClass="">
                                                            <Columns>
                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <div style="float: left; width: 500px; border-top: 1px solid #ccc">
                                                                            <asp:Label ID="lblCommentDetails" runat="server" Text='<%# GetUsername(Eval("Username").ToString()) %>'
                                                                                CssClass="CommentCriteraDetails" />
                                                                            <asp:Label ID="lblCommentDetails2" runat="server" Text='<%# " schrieb am "+Eval("Created").ToString().Remove(16) %>' />
                                                                        </div>
                                                                        <div style="float: left; width: 500px; margin-bottom: 5px;">
                                                                            "<asp:Label ID="lblComment" runat="server" Text='<%#""+ Eval("Comment")+"" %>' CssClass="CommentText" />"</div>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                        <asp:SqlDataSource ID="sdsSubComments" SelectCommand='<%#  "SELECT * FROM SubComments WHERE CommentID="+Eval("CommentID")+" Order by created" %>'
                                                            runat="server" ConnectionString="<%$connectionStrings:MainDBConnection%>" />
                                                        <asp:TextBox ID="txtsubComment" runat="server" TextMode="MultiLine" Rows="2" Width="490"
                                                            MaxLength="199" />
                                                        <asp:Button ID="btnSendSubComment" Text="Abschicken" ToolTip="Kommentar absenden"
                                                            runat="server" CssClass="button_SendSubComment" OnClick="btnSendSubComment_Click" />
                                                    </div>
                                                </asp:Panel>
                                            </div>
                                    </asp:Panel>
                                    <ajaxToolkit:CollapsiblePanelExtender runat="server" ID="cpe6" TargetControlID="PanelSubComment"
                                        Collapsed="true" ExpandControlID="lkbSubComment" CollapseControlID="lkbSubComment"
                                        SuppressPostBack="false">
                                    </ajaxToolkit:CollapsiblePanelExtender>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div>
                        <asp:LinkButton ID="btnShowMore" Text="weitere anzeigen" ToolTip="Weitere Kommentare anzeigen"
                            runat="server" CssClass="button_ShowMore" OnClick="btnShowMore_Click" Visible="false" />
                    </div>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:SqlDataSource ID="sdsComments" runat="server" ConnectionString="<%$connectionStrings:MainDBConnection%>" />
    Dans le page load de mon code behind je fais egalement un grdComments.DataBind() quand je mets cette ligne en commentaire cela fonctionne mais j'en ai besoin.

    une idee ?

  4. #4
    Expert confirmé
    Avatar de Nicolas Esprit
    Homme Profil pro
    Consultant en technologies
    Inscrit en
    Février 2010
    Messages
    1 467
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Consultant en technologies
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2010
    Messages : 1 467
    Points : 4 066
    Points
    4 066
    Par défaut
    Ok, c'est donc lors du Bind de la GridView que cela pose problème. As-tu essayé de mettre la property AutoExpand à false (voire AutoCollapse aussi) ?

    Je n'ai plus en tête les astuces pour ce genre de cas. Peux tu essayer de mettre CollapsedSize à 0, ou bien de rajouter la property css : "overflow:hidden;" ou encore "height:0px" ?

    En espérant t'avoir aidé.

Discussions similaires

  1. Refermer un div quand un autre s'ouvre
    Par vianndu57 dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 23/08/2014, 14h10
  2. [WD17] WD17 s'ouvre et se referme directement !
    Par franck34matlab dans le forum WinDev
    Réponses: 4
    Dernier message: 06/07/2014, 15h35
  3. MS Dynamics Ax2009 - Client s'ouvre et se referme
    Par HeadQuaker dans le forum Microsoft Dynamics
    Réponses: 0
    Dernier message: 08/01/2013, 17h32
  4. Réponses: 4
    Dernier message: 16/08/2011, 13h03
  5. csc.exe qui s'ouvre et se referme aussitôt
    Par dad72 dans le forum ASP.NET
    Réponses: 5
    Dernier message: 28/12/2009, 12h27

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