Ques 1. I am pasting only excerpts of my panel code (limited length here) within which I have 3 levels. The collapsible panel works fine till level 2 but when I am clicking on level 3 it shows for a second and collapses back to level 2. The collapsible doesnt
work on panel pnlUserAccess below.
Ques 2. Can I make collapsible panel work on particular button click or image click?. As when I just put to to 2 levels I have to edit within the gridview and as soon as I click on the checkbox to edit
the panel collapses.. I need to just give it a tree view style of appearance.
Ques 3. Can I also make the collapsible panel enable on read mode and disable on edit mode (if there is no possiblity for Ques 2)
Any ideas on how to make it work. Just to be more specific on the code. Thanks so much.
I have also taken help from http://forums.asp.net/t/1439439.aspx and posted my problems in the last of the thread there I am not able to retrieve the client state of the grand panel inside as it only gets
created when the parent grid view gets created. If there is any solution please let me know thanks
arpitaoberoi
Member
17 Points
31 Posts
Collapsible Panel not working in multi level of nested gridview
Aug 06, 2010 09:09 AM|LINK
Hello
Ques 1. I am pasting only excerpts of my panel code (limited length here) within which I have 3 levels. The collapsible panel works fine till level 2 but when I am clicking on level 3 it shows for a second and collapses back to level 2. The collapsible doesnt work on panel pnlUserAccess below.
Ques 2. Can I make collapsible panel work on particular button click or image click?. As when I just put to to 2 levels I have to edit within the gridview and as soon as I click on the checkbox to edit the panel collapses.. I need to just give it a tree view style of appearance.
Ques 3. Can I also make the collapsible panel enable on read mode and disable on edit mode (if there is no possiblity for Ques 2)
Any ideas on how to make it work. Just to be more specific on the code. Thanks so much.
I have also taken help from http://forums.asp.net/t/1439439.aspx and posted my problems in the last of the thread there I am not able to retrieve the client state of the grand panel inside as it only gets created when the parent grid view gets created. If there is any solution please let me know thanks
<asp:Panel ID="pnlAccessRight" runat="server">
<asp:GridView ID="gvAccessRight" runat="server" BorderStyle="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblAccessLevel"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Panel ID="pnlInnerAccessRight">
<%# Eval("AccessLevelName")%></asp:Panel>
<asp:Panel ID="pnlAccessGroup" runat= "server" BorderStyle="Dotted">
<asp:GridView ID="gvAccessGroup" runat="server" BorderStyle="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Panel ID="pnlUserAccess" runat="server" BorderStyle="Groove">
<asp:GridView ID="gvUserAccessRight" runat="server" BorderStyle="None" />
<Columns>
</Columns>
</asp:GridView>
</asp:Panel>
<asp:CollapsiblePanelExtender ID="cpUserAcess" runat="server" TargetControlID="pnlUserAccess" ExpandControlID="pnlAccessGroup"
CollapseControlID="pnlAccessGroup" CollapsedSize ="0" Collapsed="true" AutoCollapse="False" AutoExpand="true" ScrollContents="false"
ImageControlID="imgCollapsible" ExpandedImage="../Pictures/Expand_Button_white_Down.jpg"
CollapsedImage="../Pictures/expand_button_white.jpg" ExpandDirection="Vertical">
</asp:CollapsiblePanelExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<asp:CollapsiblePanelExtender ID="cpUserGroup" runat="server" TargetControlID="pnlAccessGroup" ExpandControlID="pnlInnerAccessRight"
CollapseControlID="pnlInnerAccessRight" CollapsedSize ="0" Collapsed="true" AutoCollapse="False" AutoExpand="true" ScrollContents="false"
ImageControlID="imgCollapsible" ExpandedImage="../Pictures/Expand_Button_white_Down.jpg"
CollapsedImage="../Pictures/expand_button_white.jpg" ExpandDirection="Vertical">
</asp:CollapsiblePanelExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>