Dim tip As RadToolTip = e.Item.FindControl("tipStartAddress")
RadToolTipManager1.TargetControls.Add(tip.ClientID,
True)
Furthermore once i have got this bit to work I would like to have the tooltip load its content on demand. I really don't know how i would trigger an OnAjaxUpdate event for a tooltip and add controls to it on the server.
Also, the documenation only talks about the radtooltip with an updatepanel. I use radajax now. I presume you can use a tooltip with rad ajax
many thanks in advance
| <?xml version="1.0" encoding="UTF-8"?> |
| <codeBook xmlns:xsp="http://apache.org/xsp" xmlns:util="http://apache.org/xsp/util/2.0" xmlns:xsp-session="http://apache.org/xsp/session/2.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.0" version="1.2.2" ID="ZA4350"> |
| <docDscr> |
| <citation> |
| <titlStmt> |
| <titl> |
| Title text goes here |
| </titl> |
| </titlStmt> |
| </citation> |
| </docDscr> |
| </codeBook> |
| RadTreeView rt = new RadTreeView(); |
| rt.LoadContentFile("file.xml"); |
I am fairly new to Rad controls. When i try to bind the rad menu to the hierarchial data source it is not displaying in the hierarchial order but instead showed all the items in a single row.
I tried to run the sample code from telerik site. Even with the sample the rad menu shows the items in single row instead of hierarchial manner. Please help me in this...
ASPX Code:
| <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> | |
| <%@ Page Language="c#" CodeFile="Default.aspx.cs" AutoEventWireup="true" | |
| Inherits="Telerik.Web.Examples.Menu.HierarchicalBinding.Default"%> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head id="Head1" runat="server"> | |
| </head> | |
| <body class="BODY"> | |
| <form id="mainForm" method="post" runat="server"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"> | |
| </telerik:RadStyleSheetManager> | |
| <telerik:RadMenu ID="RadMenu1" runat="server" EnableTheming="true"></telerik:RadMenu> | |
| </form> | |
| </body> | |
| </html> |
| using System; | |
| using System.Collections.Generic; | |
| using System.Configuration; | |
| using System.Data; | |
| using System.Data.SqlClient; | |
| using System.Web.UI.WebControls; | |
| using Telerik.Web.UI; | |
| using System.Collections; | |
| namespace Telerik.Web.Examples.Menu.HierarchicalBinding | |
| { | |
| public partial class Default : System.Web.UI.Page | |
| { | |
| internal class SiteDataItem | |
| { | |
| private string _text; | |
| private string _url; | |
| private int _id; | |
| private int? _parentId; | |
| public string Text | |
| { | |
| get { return _text; } | |
| set { _text = value; } | |
| } | |
| public string Url | |
| { | |
| get { return _url; } | |
| set { _url = value; } | |
| } | |
| public int ID | |
| { | |
| get { return _id; } | |
| set { _id = value; } | |
| } | |
| public int? ParentID | |
| { | |
| get { return _parentId; } | |
| set { _parentId = value; } | |
| } | |
| public SiteDataItem(int id, int? parentId, string text, string url) | |
| { | |
| _id = id; | |
| _parentId = parentId; | |
| _text = text; | |
| _url = url; | |
| } | |
| } | |
| private void BindToIEnumerable() | |
| { | |
| List<SiteDataItem> siteData = new List<SiteDataItem>(); | |
| siteData.Add(new SiteDataItem(1, 0, "All Sites", "")); | |
| siteData.Add(new SiteDataItem(2, 1, "Search Engines", "")); | |
| siteData.Add(new SiteDataItem(3, 1, "News Sites", "")); | |
| siteData.Add(new SiteDataItem(4, 2, "Yahoo", "http://www.yahoo.com")); | |
| siteData.Add(new SiteDataItem(5, 2, "MSN", "http://www.msn.com")); | |
| siteData.Add(new SiteDataItem(6, 2, "Google", "http://www.google.com")); | |
| siteData.Add(new SiteDataItem(7, 3, "CNN", "http://www.cnn.com")); | |
| siteData.Add(new SiteDataItem(8, 3, "BBC", "http://www.bbc.co.uk")); | |
| siteData.Add(new SiteDataItem(9, 3, "FOX", "http://www.foxnews.com")); | |
| RadMenu1.DataTextField = "Text"; | |
| RadMenu1.DataNavigateUrlField = "Url"; | |
| RadMenu1.DataFieldID = "ID"; | |
| RadMenu1.DataFieldParentID = "ParentID"; | |
| RadMenu1.DataSource = siteData; | |
| RadMenu1.DataBind(); | |
| } | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| if (!Page.IsPostBack) | |
| { | |
| BindToIEnumerable(); | |
| } | |
| } | |
| } | |
| } | |