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

OnItemClick event not fireing

2 Answers 76 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
David Blok
Top achievements
Rank 1
David Blok asked on 02 Dec 2009, 08:51 AM

I have a problem with the onitemclick event.

It will not fire for some reason.

Below the control page

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="verticalmenu.ascx.vb" Inherits="Structures_verticalmenu" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<telerik:RadAjaxManagerProxy ID="ProxyRadMenuvert1" runat="server">  
</telerik:RadAjaxManagerProxy> 
 
<telerik:RadPanelBar runat="server" ID="panelmenu1" Width="100%" OnItemClick="RadPanelBar1_ItemClick" /> 
 
 
<asp:label Runat="server" ID="Label1" Text="Standard"></asp:label> 
 


Code behind it

Imports System  
Imports System.Data  
Imports System.Data.SqlClient  
Imports Telerik.Web.UI  
 
 
 
Partial Class Structures_verticalmenu  
    Inherits System.Web.UI.UserControl  
 
    Private Sub BindToDataSet()  
 
        Dim adapter As New SqlDataAdapter("SELECT * FROM TblPages", _  
            ConfigurationManager.ConnectionStrings("Varodb").ConnectionString)  
 
        Dim Menu As New DataSet()  
 
        adapter.Fill(Menu)  
 
        panelmenu1.DataTextField = "Pagename" 
        panelmenu1.DataFieldID = "ID" 
        panelmenu1.DataFieldParentID = "PageID" 
 
 
 
        panelmenu1.DataSource = Menu  
        panelmenu1.DataBind()  
 
    End Sub 
 
 
    Protected Sub RadPanelBar1_ItemClick(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadPanelBarEventArgs)  
 
        Label1.Text = "Clicked panel item - " + e.Item.Text  
    End Sub 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
 
        If Not Page.IsPostBack Then 
            BindToDataSet()  
        End If 
 
 
    End Sub 
 
End Class 
 

Anyone has a suggestion ?

2 Answers, 1 is accepted

Sort by
0
David Blok
Top achievements
Rank 1
answered on 02 Dec 2009, 12:22 PM
I've tested the code now on a aspx page and it works perfectly. So i think it need configuration in the proxymanager.
0
David Blok
Top achievements
Rank 1
answered on 04 Dec 2009, 11:09 AM
nvm found the problem, a form validator from another user control gave somekind of conflict with the onclick function.
Tags
PanelBar
Asked by
David Blok
Top achievements
Rank 1
Answers by
David Blok
Top achievements
Rank 1
Share this question
or