Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

CollapsiblePanelExtender won't expand from code behind

$
0
0

Hi All-

I have a CollapsiblePanelExtender inside a nested repeater in an update panel like so:

UpdatePanel > ParentRepeater > ParentCollapsiblePanelExtender > ChildRepeater > ChildCollapsiblePanelExtender

The the collapsed state setting of the Child CPE is set to True.  When a certain condition is met in the code behind, I need to change that to False, so the the Child CPE is expanded.  I've tried the below code in just about every lifecycle event of the page and the controls.  

 For Each item In SearchResultsParentRepeater.Items

               
                Dim chldRptr As System.Web.UI.WebControls.Repeater = DirectCast(item.FindControl("SearchResultsChildRepeater"), System.Web.UI.WebControls.Repeater)

                For Each item2 In chldRptr.Items

                    'Get the Collapsible Panel Extender inside of the Repeater
                    Dim cpe As AjaxControlToolkit.CollapsiblePanelExtender = DirectCast(item2.FindControl("ChildCollapsiblePanelExtender"), AjaxControlToolkit.CollapsiblePanelExtender)

                    cpe.Collapsed = False
                    cpe.ClientState = "false"


                Next

            Next


  No matter what I try, the page renders the Child CPE collapsed however the collapse/expand image shows it as expanded.  When clicking to collapse/expand the first time, that image changes to the expand image.  Then it works fine after that.

In other words, it seems that the Child CPE collapsed property and client state were succesfully changed to False in the code behind, but it only worked on the collapse/expand image, not expanding the panel itself, almost as if the the ClientState is not being changed.

Does anyone know why this is happening?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>