This is a migrated thread and some comments may be shown as answers.

OnClick Event Not Firing When Expand/Collapse Arrow Is Clicked

1 Answer 59 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 09 Aug 2012, 02:41 PM

I have a hierarchical PanelBar that uses the OnClick event handler to post back to the server.  The server uses this information as parameters for a SQL query whose results will be shown on the next page.  When the user clicks the actual panel bar itself (in the text area), this works fine.  However, if the user clicks the Expand/Collapse arrow, the event is not triggered and no postback occurs.  I noticed this same behavior in the PanelBar Server-Side Demo here: http://demos.telerik.com/aspnet-ajax/panelbar/examples/serverside/serversideevents/defaultcs.aspx

I've looked around the forums and have seen solutions that completely remove the Expand/Collapse image using CSS, but I still want the image there so the user knows if there are child items that can be viewed.

Is there a way to either catch this click on the client-side and force the event to trigger, or is there a setting that I'm missing?  Or, how can I have that arrow appear while using the <ItemTemplate>?

I'm using Telerik Version: "Telerik.Web.UI, v.2011.3.1305.40"

Here's the markup (note that the items are created programatically on the server-side in Page_Load):

 

 

 

<div id="accountPanelBarDiv" style="float:left;width:215px">

 

 

 

<telerik:RadAjaxPanel ID="accountAjaxPanel" runat="server" LoadingPanelID="accountLoadingPanel">

 

 

 

<telerik:RadPanelBar ID="accountPanelBar" runat="server" Width="200px"

 

 

 

    onitemclick="accountPanelBar_ItemClick" PersistStateInCookie="true"

 

 

 

    ExpandMode="SingleExpandedItem" AllowCollapseAllItems="true"

 

 

 

    ExpandAnimation-Duration="1000">

 

 

 

</telerik:RadPanelBar>

 

 

 

</telerik:RadAjaxPanel>

 

 

 

 

</div>

 

1 Answer, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 10 Aug 2012, 03:14 PM
Hello Jeff,

There is no server event associated with the expand/collapse handle.
Here is a forum post which discusses the same problem.

We will consider adding such server-side event in the future, but it will be different from ItemClick.

Regards,
Helen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
PanelBar
Asked by
Rich
Top achievements
Rank 1
Answers by
Helen
Telerik team
Share this question
or