or
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> |
| 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 Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) |
| Label1.Text = "Clicked panel item - " + e.Item.Text |
| End Sub |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| If Not Page.IsPostBack Then |
| BindToDataSet() |
| End If |
| End Sub |
| End Class |

| protected void RadGridRelations_NeedDatasource(object source, GridNeedDataSourceEventArgs e) |
| { |
| RadPanelItem panelItem = panelBarProfile.FindItemByValue("relations"); |
| if (panelItem.Expanded) |
| { |
| RadGrid radGrid = source as RadGrid; |
| radGrid.DataSource = BLDocument.GetAllRelatedDocumentsMultipleTimes(CacheHelper.Instance.Document.id, _userId); |
| radGrid.MasterTableView.NoMasterRecordsText = LanguageHelper.GetText("noRelationsText"); |
| } |
| } |
| Dim adapter As New SqlDataAdapter("SELECT * FROM TblPages", _ |
| ConfigurationManager.ConnectionStrings("Varodb").ConnectionString) |
| Dim Menu As New DataSet() |
| adapter.Fill(Menu) |
| RadMenu1.DataTextField = "Pagename" |
| RadMenu1.DataFieldID = "ID" |
| RadMenu1.DataFieldParentID = "PageID" |
| RadMenu1.DataSource = Menu |
| RadMenu1.DataBind() |
| Protected Sub Click(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) |
| Label1.Text = "ItemClick: " + e.Item.Text |
| End Sub |
| <telerik:RadSpell ID="rsSpell" runat="server" Skin="Office2007" ButtonType="None" /> |
| spellCheck(); |
| $find("<%= rsSpell.ClientID %>").add_clientCheckFinished(SendSMSAfterSpell); |
| //here we create a simple text source for the RadEditor control - used to get/set the text |
| //to spellcheck |
| function EditorTextSource(editor) { |
| this._editor = editor; |
| } |
| EditorTextSource.prototype = |
| { |
| get_text: function() { |
| var text = this._editor.get_html(true); |
| return text; |
| }, |
| set_text: function(text) { |
| this._editor.set_html(text); |
| } |
| } |
| //this function creates a composite text source for the RadSpell control (using a RadEditor |
| //and a TextBox). The content of all controls is checked at the same time. |
| function spellCheck() { |
| var elements = [new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtSCSDetails.ClientID %>")), |
| new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtMessage.ClientID %>"))]; |
| var spellSource = new Telerik.Web.UI.Spell.MultipleHtmlElementsSource(elements); |
| var spell = $find("<%= rsSpell.ClientID %>"); |
| spell.spellCheck(spellSource); |
| } |
| function SendSMSAfterSpell(sender, args) { |
| args.suppressCompleteMessage = true; |
| var text; |
| text = $find("<%= txtMessage.ClientID %>"); |
| text.updateDisplayValue(); |
| text = $find("<%= txtSCSDetails.ClientID %>"); |
| text.updateDisplayValue(); |
| SendMessage(); // this does the postback, which still sees the controls as having incorrect spelling |
| } |