This is a migrated thread and some comments may be shown as answers.
Deselect
2 Answers 30 Views
This is a migrated thread and some comments may be shown as answers.
MD
Top achievements
Rank 1
MD asked on 21 Oct 2009, 05:30 PM
What would be the easiest way client-side to have a panel bar item appear unselected after it is collapsed?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 22 Oct 2009, 06:10 AM
Hello,

I tried following code in order to deselect the item after collapsing. Give a try with this.

JavaScript:
 
<script type="text/javascript"
    var item; 
    function OnClientItemCollapse(sender, args) { 
        item = args.get_item(); 
        setTimeout("item.set_selected(false);", 100); 
    } 
</script> 
[Attach OnClientItemCollapse event to RadPanelBar]

-Shinu.
0
Paul
Telerik team
answered on 22 Oct 2009, 06:17 AM
Hi MD,

Please find below a sample code snippet that shows the needed approach.

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
 
    <script type="text/javascript">
        function OnClientItemCollapse(sender, eventArgs) {
            var item = eventArgs.get_item();
            setTimeout(function() { item.unSelect(); }, 0);
        }
 
    </script>
 
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Forest" OnClientItemCollapse="OnClientItemCollapse">
        <Items>


Kind regards,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
MD
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Paul
Telerik team
Share this question
or