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
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
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.
Bonjour voilá le bout de code
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.
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%>" />
une idee ?
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é.
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager