Connecting Tech Pros Worldwide Forums | Help | Site Map

Collapsible panel Events

Member
 
Join Date: Dec 2007
Posts: 44
#1: Mar 17 '09
i have a grid inside a collapsible panel in my page.

on expand of collapsible panel i want to bind data to grid.
how can i do this?
how to get the events of collapsible panel.

please help

regards,
veena.

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,777
#2: Mar 17 '09

re: Collapsible panel Events


I guess it depends *which* collapsible panel you are talking about.

Is it from the ajaxtool kit?
From CodeProject?

Or is it a .NET 3.5 control I've never used?
Member
 
Join Date: Dec 2007
Posts: 44
#3: Mar 17 '09

re: Collapsible panel Events


i am using ajaxtool kit.

regrds,
veena
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,777
#4: Mar 17 '09

re: Collapsible panel Events


Not my area of knowledge.
Anyone else able to help Veenna?
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,131
#5: Mar 18 '09

re: Collapsible panel Events


Well, I don't think this is going to be easy.
Check out this thread for more information...I know the thread refers to a ModalPopupExtender, but the same concepts can be applied to the Collapsible Panel.
Member
 
Join Date: Dec 2007
Posts: 44
#6: Aug 21 '09

re: Collapsible panel Events


It is possible to bind the grid on expansion of Collapsible panel..

For that add one hidden button and on expand just do postback. and in button event just write code to bind the grid.

Here is the code

Expand|Select|Wrap|Line Numbers
  1.  
  2. <script language="javascript" type="text/javascript">
  3. function pageLoad() 
  4.     {
  5.         //to handle the client event of the ColCandidateRequest
  6.         if($find('<%=ColCandidateRequest.ClientID%>')!=null)
  7.         {
  8.             $find('<%=ColCandidateRequest.ClientID%>').add_expandComplete(postCandidateRequest);
  9.         }
  10.     }
  11.  
  12.  
  13. function postCandidateRequest() 
  14.     {
  15.         var btnName = $get("<%=btnCandidateRequest.ClientID%>").name;
  16.         __doPostBack(btnName,"click");          
  17.     }
  18. </script>
  19.  

Add hidden button
(aspx page )
Expand|Select|Wrap|Line Numbers
  1.  <asp:Button Style="display: none" ID="btnCandidateRequest" OnClick="btnCandidateRequest_Click"
  2.                     runat="server" Text="Button"></asp:Button>
  3.                 <cc1:CollapsiblePanelExtender ID="ColCandidateRequest" runat="server" EnableViewState="true"
  4.                     SuppressPostBack="true" ImageControlID="imgCandSubReq" Collapsed="true" CollapseControlID="PanelCandSubReq"
  5.                     ExpandControlID="PanelCandSubReq" TargetControlID="PanelCandSubReqGrid" TextLabelID="lblCandSubReq" CollapsedText="Show"
  6.                     ExpandedText="Hide">
  7.                 </cc1:CollapsiblePanelExtender>
  8.  

And in the btnCandidateRequest_Click event write code for binding the grid.

regards,
Veena
Reply