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

Up Down Arrow Indicator RadPanelBar

12 Answers 157 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Jan 2012, 02:19 PM
I'm working with the RadPanelBar, and I am writing to ask if the Up Down Arrow indicator of a parent RadPanelItem can be wired up to a click event;

Clicking on a parent-level RadPanelItem (or child-level RadPanelItem) initiates a click event - however if the Up Down Arrow Indicator on the right part of the RadPanelItem is clicked, no event is registered in the C# code-behind;

Any insight is appreciated;

12 Answers, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 20 Jan 2012, 09:48 AM
Hello Robert,

The issue that you describe is a bug of the RadPanelBar that we are already aware of. It is logged in our internal system so we can fix it. Meanwhile I could suggest that you use jQuery to find the ExpandHandler by its css class (rpExpandHandle) and attach a click event.

Greetings,
Kate
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
0
Ken
Top achievements
Rank 1
answered on 20 Feb 2012, 03:24 PM
Has this fix been distributed yet? If yes, where and how can I obtain it.
0
Kate
Telerik team
answered on 23 Feb 2012, 04:20 PM
Hi Ken,

The issue is still not fixed but you can keep track on it in our PITS. Below you can find a link to the issue:
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/5778

Regards,
Kate
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.
0
Rodney King
Top achievements
Rank 1
answered on 29 Mar 2013, 07:27 PM
the clicked does not work when clicking the arrow, clicking on the bar works.  Can you post a work around since no one appears to be working on this issue?
0
Kate
Telerik team
answered on 01 Apr 2013, 10:40 AM
Hello Rodney,

Our developers have already reviewed the issue with the Click event firing when the expand/collapse handler is clicked. Unfortunately such scenario would introduce a conflict of the behavior of the RadPanelBar control when the NavigateUrl property is used. If implemented for instance, a single click on the RadPanelItem expand/collapse handler will cause postback, expansion and at the same time navigation to another page. Therefore, we decided not to invoke the Click event when the expand/collapse handler is clicked. As a possible workaround, however, you can use the following javascript function that fires a click event when an expand/collapse handle is clicked:
<script type="text/javascript">
              $telerik.$(document).ready(function () {
                  $telerik.$(".rpExpandHandle").click(function () {
                      alert(1);
                  });
              });
          </script>

Kind regards,
Kate
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.
0
Waseem
Top achievements
Rank 1
answered on 19 Apr 2013, 10:22 PM
Hi Kate

How to check, if any item is expanded or collapse.
so if item is collapse , we can expand it. if item is expand , we collapse it.

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
                    <script type="text/javascript">
                        $telerik.$(document).ready(function() {
                            $telerik.$(".rpExpandHandle").click(function() {
                                var panelBar = $find("<%= radPanelBar.ClientID %>");
                                if (  ) { //if it is collapse then expand it otherwise collapse it.
                                    panelBar.get_items().getItem(0).expand();
                                }
                                else {
                                    panelBar.get_items().getItem(0).collapse();
                                }
                             });
                        });
                    </script>
                </telerik:RadCodeBlock>

Thanks,
the telerik team
0
Waseem
Top achievements
Rank 1
answered on 19 Apr 2013, 11:07 PM
I got a solution, by making isExpanded true , so it solve my problem. 
         
      <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
                    <script type="text/javascript">
                        var isExpanded = true;
                        $telerik.$(document).ready(function() {
                            $telerik.$(".rpExpandHandle").click(function() {
                                var panelBar = $find("<%= radPanelBar.ClientID %>");
                                if (isExpanded == true) {
                                    panelBar.get_items().getItem(0).collapse();
                                    isExpanded = false;
                                }
                                else {
                                    panelBar.get_items().getItem(0).expand();
                                    isExpanded = true;
                                }
                            });
                        });
                    </script>
                </telerik:RadCodeBlock>

Thanks.
Muhammad Waseem
the telerik team
0
Mary
Top achievements
Rank 1
answered on 27 Sep 2013, 07:21 AM
Hi guys,
I have the same issue and I would like to use this javascript code Waseem (Animation Lover) proposed, but I wonder how to get the right RadPanelItem which was previously clicked, not only the first item.
Any help would be appreciated,

Thanks in advance.
Mary.
0
Waseem
Top achievements
Rank 1
answered on 01 Oct 2013, 05:41 PM
you can get all data in detail.
http://www.telerik.com/help/aspnet-ajax/panelbar-client-side-radpanelbaritem.html
http://demos.telerik.com/aspnet-ajax/panelbar/examples/clientside/clientsideevents/defaultcs.aspx

Thanks,
Muhammad Waseem
the Telerik team
0
Matt
Top achievements
Rank 1
answered on 27 May 2018, 04:32 PM
Is there a solution to this problem?  I'm still experiencing this.
0
Matt
Top achievements
Rank 1
answered on 27 May 2018, 04:36 PM
Never mind, this appears to be working, just not the way that I would expect.  Typically with an arrow you can toggle it up or down when clicking.  This only appears to work on expand.  Collapse is only triggered by expanding another option.
0
Waseem
Top achievements
Rank 1
answered on 28 May 2018, 07:27 AM

You can achieve by using this below code.
         
      <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
                    <script type="text/javascript">
                        var isExpanded = true;
                        $telerik.$(document).ready(function() {
                            $telerik.$(".rpExpandHandle").click(function() {
                                var panelBar = $find("<%= radPanelBar.ClientID %>");
                                if (isExpanded == true) {
                                    panelBar.get_items().getItem(0).collapse();
                                    isExpanded = false;
                                }
                                else {
                                    panelBar.get_items().getItem(0).expand();
                                    isExpanded = true;
                                }
                            });
                        });
                    </script>
                </telerik:RadCodeBlock>

Mine Email is: emc_waseem@hotmail.com

if you still got any error. Email me.

Tags
PanelBar
Asked by
Robert
Top achievements
Rank 1
Answers by
Kate
Telerik team
Ken
Top achievements
Rank 1
Rodney King
Top achievements
Rank 1
Waseem
Top achievements
Rank 1
Mary
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Share this question
or