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

RadPanelBar Expand Collapse Issue

1 Answer 27 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
VIJESH
Top achievements
Rank 1
VIJESH asked on 03 Sep 2013, 02:41 PM
I have the below line in my header template of radpanelbar.
<td style="text-align: right"><span class="rpExpandHandle" style="cursor: pointer;"></span></td>
I want to capture this expand collapse event from onclientitemclicking function.
On expanding/collapsing i want to prompt the user. How can i achieve this.

1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 06 Sep 2013, 07:26 AM
Hello VIJESH,

Thank you for contacting Telerik Support.

For your case you could use OnClientItemClicking event. Here is a sample code how you could use it:
        <telerik:RadPanelBar runat="server" ID="PanelBar1" OnClientItemExpand="OnClientItemExpand" OnClientItemClicking="OnClientItemClicking">
            <Items>
                <telerik:RadPanelItem Text="item1">
                    <HeaderTemplate>
                        <div style="width:100px; height:10px; background-color:red" ></div>
                    </HeaderTemplate>
                    <Items>
                        <telerik:RadPanelItem Text="item 1.1"></telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="item 1.1"></telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="item2">
                    <Items>
                        <telerik:RadPanelItem Text="item 2.1"></telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="item 2.1"></telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
 
<script type="text/javascript">
    function OnClientItemClicking(sender, args) {
        console.log("clicking");
    }
 
    function OnClientItemExpand(sender, args) {
        console.log("expand");
 
    }
</script>


I will be glad to assist you further.

Regards,
Peter Filipov
Telerik
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 the blog feed now.
Tags
PanelBar
Asked by
VIJESH
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Share this question
or