Jun 26, 2010

How to find expandedPaneId of Rad Sliding Pane and collapse + Client side

While using more sliding panes in my project , there was a need to expand and collapse panes manually and programatically. 

When doing so, i noticed a problem with Sliding Pane that when we try to expand a pane when already other pane is expanded , there was a mesh. 

Both the panes are expanded but the Close[x] button is not working in the panes.
i.e we are unable to close the pane using the Close[x] button on the pane.

so here we go how to solve this problem?
The solution is " Lets find the expanded pane id for the SlidingZone and collapse it first before opening a new pane. Below is the code.

// finds the Rad sliding zone first in which the pane resides
var slidingZone = $find("SlidingZone1");
 var slidingZone = $find("<%= SlidingZone1.ClientID %>"); // for Master Page Scenerio

// find the expanded pane id of the zone and collapse it
var expandedPaneId = slidingZone.get_expandedPaneId();

 // To collapse the pane 
      slidingZone.collapsePane(expandedPaneId );

After this, one can perform expand collapse pane operations as shown in my previous post without mesh.

No comments: