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

RadPanelBar Click event is not firing

5 Answers 279 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 13 Jun 2011, 05:11 PM
 Hello,

I am using Telerik PanelBar. I am using the version of 2010.3.1317.20. I cant upgrade to the latest version as the framework I am using .Net 2.0.

I have added the PanelBar in the MasterPage, When i Click on any of the item in the panel bar, the Click event is not firing.

The panelbar is populated at runtime. also the NavigateUri is set at runtime.

<telerik:RadPanelBar runat="server" ID="RadPanelNavBar" Visible="false" ExpandMode="MultipleExpandedItems" 
                                        OnItemClick="RadPanelNavBar_ItemClick" EnableViewState="true">
                                </telerik:RadPanelBar>

the below code is how i am adding the RadPanelItems

For Each mnuChildRow As DataRow In dtFilterData.Rows
                                Dim menuAdminChild As New RadPanelItem()                                
                                menuAdminChild.Text = mnuChildRow.Item(Field.DisplayName).ToString()
                                menuAdminChild.NavigateUrl = "../" + mnuChildRow.Item(Field.ResourceName).ToString()
                                menuMFGHeader.Items.Add(menuAdminChild)
                            Next

The click event is below

Protected Sub RadPanelNavBar_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelNavBar.ItemClick
        If e.Item.Items.Count > 0 Then
            If e.Item.Expanded = False Then
                'Label1.Text = "Collapsed panel item - " + e.Item.Text
            Else
                'Label1.Text = "Expanded panel item - " + e.Item.Text
            End If
        Else
            'Label1.Text = "Clicked panel item - " + e.Item.Text
        End If
    End Sub

What finally i require is to have the RadPanelItem as selected on which the user last clicked. rest all remains un selected.

5 Answers, 1 is accepted

Sort by
0
Ravi
Top achievements
Rank 1
answered on 14 Jun 2011, 05:39 AM
Appreciate your early response on this issue.

Thanks,
0
Helen
Telerik team
answered on 14 Jun 2011, 09:54 AM
Hi David,

Probably you will find helpful the following help topic:
http://www.telerik.com/help/aspnet-ajax/menu-itemclick-event-not-fired.html

Kind regards,
Helen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Ravi
Top achievements
Rank 1
answered on 22 Jun 2011, 12:50 PM
I have RadPanelBar implemented in the MasterPage under "Is Not PostBack". When the user clicks the Rad Item the page is getting postback which is fine. but the master page IsPostBack is always false.

Because of the above, I have two issues.

1) The clicked panel item is not selected as the RadPanelBar is re-created again. the recreation is happening because IsPostBack is always false. IsPostback is becoming always false because the RadPanelItem have NavigateURL.

2) There is Expand/Collapse button. each time the page is postback, and due to IsPostback is always false, the rad panel bar is re-created everytime. so if the user had collapsed few headers, then that is also not retained.

Please let me know how to proceed in this scenario

Thanks,
Shiras
0
Ravi
Top achievements
Rank 1
answered on 24 Jun 2011, 08:18 AM
Appreciate your early response on this issues.

Thanks
0
Helen
Telerik team
answered on 24 Jun 2011, 09:34 AM
Hi David,

Since your scenario is a bit complicated, could you please open a support ticket and send us a sample project which demonstrates the issue to examine it locally?

Best wishes,
Helen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
PanelBar
Asked by
Ravi
Top achievements
Rank 1
Answers by
Ravi
Top achievements
Rank 1
Helen
Telerik team
Share this question
or