Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
521 views
Hi there,
our applications run with embedded scripts switched off and the scripts served from a separate domain. We now have a need to use the RADEditor, but the streamed popup windows (link manager, image manager, etc.) cause javascript errors. I have confirmed this with a small project as follows:

VS2008 SP1
.Net framework 3.5 SP1
Telelerik DLL 2008.2.826.35

script folder containing all external scripts:
~/script/telerik/* (all telerik scripts)
~/script/ajax/System.Web.Extensions/3.5.0.0/3.5.21022.8/* (MS Ajax 3.5)
~/script/ajax/System.Web.Extensions/3.5.0.0/3.5.30729.1/* (MS Ajax 3.5 SP1)

Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadEditor._Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:radscriptmanager runat="server" id="TelerikScriptManager" enablescriptcombine="false" enablepartialrendering="true" loadscriptsbeforeui="false" enableviewstate="false" enablescriptglobalization="true" enablescriptlocalization="true" scriptmode="Release" /> 
        <telerik:radeditor runat="server" id="radEditor1" enabletheming="True" stripformattingonpaste="AllExceptNewLines" toolsfile="~/EditorTools.xml" newlinebr="False" language="en-GB"
            <Content> 
            </Content> 
        </telerik:radeditor> 
    </div> 
    </form> 
</body> 
</html> 
 

Default.aspx.cs:
using System; 
using System.Collections; 
using System.Configuration; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.HtmlControls; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Xml.Linq; 
using Telerik.Web.UI; 
 
namespace RadEditor 
    public partial class _Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (ConfigurationManager.AppSettings["Telerik.EnableEmbeddedScripts"].ToLower() == "false"
            { 
                ScriptManager manager = System.Web.UI.ScriptManager.GetCurrent(this.Page); 
 
                // Microsoft Ajax 
                manager.ScriptPath = "~/script/ajax"
 
                // Telerik Scripts 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Common/Core.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Common/Popup/PopupScripts.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Editor/RadEditor.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Dialogs/DialogOpener.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Editor/Modules.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Spell/SpellCheckService.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Editor/AjaxSpellCheck.js")); 
                manager.Scripts.Add(new ScriptReference("~/script/telerik/Window/RadWindow.js")); 
            } 
        } 
    } 

Web.Config:
<?xml version="1.0"?> 
<configuration> 
  <configSections> 
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> 
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup> 
  </configSections> 
  <appSettings> 
    <add key="Telerik.EnableEmbeddedScripts" value="false"/> 
  </appSettings> 
  <connectionStrings/> 
  <system.web> 
    <!--  
            Set compilation debug="true" to insert debugging  
            symbols into the compiled page. Because this  
            affects performance, set this value to true only  
            during development. 
        --> 
    <compilation debug="true"
      <assemblies> 
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
      </assemblies> 
    </compilation> 
    <!-- 
            The <authentication> section enables configuration  
            of the security authentication mode used by  
            ASP.NET to identify an incoming user.  
        --> 
    <authentication mode="Windows"/> 
    <!-- 
            The <customErrors> section enables configuration  
            of what to do if/when an unhandled error occurs  
            during the execution of a request. Specifically,  
            it enables developers to configure html error pages  
            to be displayed in place of a error stack trace. 
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"
            <error statusCode="403" redirect="NoAccess.htm" /> 
            <error statusCode="404" redirect="FileNotFound.htm" /> 
        </customErrors> 
        --> 
    <pages> 
      <controls> 
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagPrefix="telerik"/> 
      </controls> 
    </pages> 
    <httpHandlers> 
      <remove path="*.asmx" verb="*" /> 
      <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
       validate="false" /> 
      <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
       validate="false" /> 
      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
       validate="false" /> 
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
        validate="false" /> 
      <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
    validate="false" /> 
    </httpHandlers> 
    <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    </httpModules> 
  </system.web> 
  <system.codedom> 
    <compilers> 
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        <providerOption name="CompilerVersion" value="v3.5"/> 
        <providerOption name="WarnAsError" value="false"/> 
      </compiler> 
    </compilers> 
  </system.codedom> 
  <!--  
        The system.webServer section is required for running ASP.NET AJAX under Internet 
        Information Services 7.0.  It is not necessary for previous version of IIS. 
    --> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/> 
    <modules> 
      <remove name="ScriptModule"/> 
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated"/> 
      <remove name="ScriptHandlerFactory"/> 
      <remove name="ScriptHandlerFactoryAppServices"/> 
      <remove name="ScriptResource"/> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    </handlers> 
  </system.webServer> 
  <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
      </dependentAssembly> 
    </assemblyBinding> 
  </runtime> 
</configuration> 
 

EditorTools.xml:
<?xml version="1.0" encoding="utf-8" ?> 
<root> 
  <modules> 
    <module name="RadEditorStatistics" dockingZone="Bottom" enabled="true" visible="true" dockable="true" /> 
  </modules> 
  <tools name="toolbar1" dockable="true" enabled="true"
    <tool name="FormatBlock" /> 
    <tool separator="true" /> 
    <tool name="Bold" /> 
    <tool name="Italic" /> 
    <tool separator="true" /> 
    <tool name="Indent" /> 
    <tool name="Outdent" /> 
    <tool separator="true" /> 
    <tool name="InsertOrderedList" /> 
    <tool name="InsertUnorderedList" /> 
  </tools> 
  <tools name="toolbar2" dockable="true" enabled="true"
    <tool name="FindAndReplace" /> 
    <tool separator="true" /> 
    <tool name="Cut" /> 
    <tool name="Copy" /> 
    <tool name="Paste" /> 
    <tool separator="true" /> 
    <tool name="Undo" /> 
    <tool name="Redo" /> 
  </tools> 
  <tools name="toolbar3" dockable="true" enabled="true"
    <tool name="Superscript" /> 
    <tool name="Subscript" /> 
    <tool separator="true" /> 
    <tool name="InsertParagraph" /> 
    <tool name="InsertHorizontalRule" /> 
    <tool name="InsertTable" /> 
  </tools> 
  <tools name="toolbar4" dockable="true" enabled="true"
    <tool name="LinkManager" /> 
    <tool name="Unlink" /> 
  </tools> 
  <tools name="toolbar5" dockable="true" enabled="true"
    <tool name="FormatStripper" /> 
    <tool name="XhtmlValidator" /> 
    <tool name="ToggleScreenMode" /> 
  </tools> 
  <paragraphs> 
    <paragraph value="&lt;p&gt;" name="Normal" /> 
    <paragraph value="&lt;h1&gt;" name="&lt;h1&gt;Heading 1&lt;/h1&gt;" /> 
    <paragraph value="&lt;h2&gt;" name="&lt;h2&gt;Heading 2&lt;/h2&gt;" /> 
    <paragraph value="&lt;h3&gt;" name="&lt;h3&gt;Heading 3&lt;/h3&gt;" /> 
    <paragraph value="&lt;h4&gt;" name="&lt;h4&gt;Heading 4&lt;/h4&gt;" /> 
    <paragraph value="&lt;h5&gt;" name="&lt;h5&gt;Heading 5&lt;/h5&gt;" /> 
  </paragraphs> 
</root> 

I would be grateful if this can be looked into ASAP. I guess it may be another script ordering problem or missing script. The order and scripts were obtained from your help http://www.telerik.com/help/aspnet-ajax/disabling_embedded_resources.html

Kind regards,

Rob


Rumen
Telerik team
 answered on 01 Jul 2010
3 answers
166 views
Hi,

I have implemented a RAD tooltip manager to a label inside a grid with the HideEvent="ManualClose". The original width of tooltip is 30px (Width="30px") and is reset dynamically to fit actual information inside. However, the close button is still on it's original position. Is there any way to set up the Close button to be always on the top left corner of the tooltip?

Thank you
DW Web Team Member
Top achievements
Rank 2
 answered on 01 Jul 2010
11 answers
445 views
Hi guys,

I'm trying to get the onscroll event of the radPane and I'm having problems with the method GetContentContainerElement() of the pane. When I call this method it gives me a javascript error saying Object doesn't support this property or method.
Actually what I am trying to do is:

I have 2 panels and I want to scrolll the pane2 if the pane1 scrolls and vice versa.

The code I'm trying to use is :

<telerik:RadSplitter  id="RadSplitter1" runat="server" width="100%" Height="327px" onclientloaded="InitializeScrollHandler">
    
<telerik:RadPane id="pane1" runat="server" Scrolling="Both" >
    ........Content
    
</telerik:RadPane>

   <telerik:RadSplitBar id="RadSplitbar1" Height="100%" runat="server" CollapseMode="Both"></telerik:RadSplitBar>

 

 

   <telerik:RadPane id="pane2" runat="server" scrolling="Both">
    ........Content
    </telerik:RadPane>
</telerik:RadSplitter>

 

 

 


function 
InitializeScrollHandler(){

 

    var splitter = $find("<%= RadSplitter1.ClientID %>");
    var pane1 = splitter.GetPaneById('<%= pane1.ClientID %>');
    var pane2 = splitter.GetPaneById("<%= pane2.ClientID %>");
    var pane2Div = pane2.GetContentContainerElement();

 

   var scrollHandler = function () {

         var scrollPosition = pane2.GetScrollPos();
         pane1.SetScrollPos(scrollPosition.left, scrollPosition.top);
    }
    pane2Div.onscroll = scrollHandler;

 

}

Am I doing something wrong?!

Thanks in advanced,

Francisco

 

 

Jason Bourdette
Top achievements
Rank 1
 answered on 01 Jul 2010
1 answer
124 views
Hi,

I would like the advanced form appear while clicking on the button which is in one page and access and manipulate the all controls in the advanced forms as per our wish. How to do.

Kind Regards,
I.Arockiasamy 
T. Tsonev
Telerik team
 answered on 01 Jul 2010
1 answer
206 views
I have copy the exact blockConfirm script in the demo, and try to use it in my custom dialog. it works fine if I put it in the button "OnClientClick" event directly.

here is my working code snippet

OnClientClick="return blockConfirm('The selected Dynamic Content will be deleted. Are you sure you would like to continue?', event, 450, 100,'','DELETE DYNAMIC CONTENT');" 



However, now I need to do ajax postback to do another check and alert before I show the confirm, I changed OnClientClick to call "DeleteDynamicContent" function, and I received 'event' is not defined error.

here is my new js

function DeleteDynamicContent(dynamicContentID) { 
 
        PageMethods.GetTotNoOfRules( 
            dynamicContentID, 
            Validate_OnSucceeded, Validate_OnFailed); 
        return false
    } 
 
    function Validate_OnSucceeded(result) { 
        if (result == true) { 
            radalert('<%= getHelpText("Delete Dynamic Content Alert", "1a") %>', 450, 100, "DELETE DYNAMIC CONTENT"); 
            return
        } 
        else { 
            return blockConfirm('The selected Dynamic Content will be deleted. Are you sure you would like to continue?', event, 450, 100, '''DELETE DYNAMIC CONTENT'); 
        } 
 
    } 
 
    function Validate_OnFailed(error) { 
        alert(error);         
    } 



Please help!

Thanks

Georgi Tunev
Telerik team
 answered on 01 Jul 2010
1 answer
102 views
After trying for hours to accomplish something that in theory should be a simple task, i've decided to turn to the forums for help!

I have a tree view (with checkboxes) with ONE parent node, and multiple child nodes.

I also have an asp:OptionButtonList, with three options: Full, Partial, and None.

If a user clicks "Full", the Parent node and child nodes should be checked.

If a user clicks "Partial", only the Parent node should be checked...no child nodes.

And, obviously, if a user clicks "None", no nodes should be checked.

I can get the Full and None options to work...but not the partial.

Can anyone help?

So far i'm doing this:

switch (rbl.SelectedValue)  
            {  
                case "FullToHMHS":  
                    radTreeView.CheckAllNodes();  
                    return;  
                case "FullToOther":  
                    isChecked = false;  
                    break;  
                case "Partial":  
                    isChecked = false;  
                    break;  
                default:  
                    break;  
            }  
 
            foreach (RadTreeNode node in radTreeView.Nodes)  
            {           
                node.Checked = isChecked;                  
            } 

obviously this isn't going to accomplish what I want for the "Partial" option, but i've tried what seems like a billion different things, and I can't seem to just check the Parent Node...

Thanks in advance!
V
Nikolay Tsenkov
Telerik team
 answered on 01 Jul 2010
1 answer
42 views
Hi,

I have an ASPX page, which I want to display in a RadWindow.
Is this possible?

Please suggest.

Thanks.
Debashis
Georgi Tunev
Telerik team
 answered on 01 Jul 2010
1 answer
46 views
Hi Telerik,
I was just trying to get into the subject mentioned above and when I used your sample from the documentation I realised that it wouldn't work. It took me a while to figure out why: one needs to add something like "<input type="text" id="txtUserInput" />" to the Dialog page. Otherwise it just shows a blank RadWindow which is not quite whar the example intends to demonstrate. As a newbie to the Telerik controls I find it irritating if the demos don't work as such.

Thanks, Wolfgang

Georgi Tunev
Telerik team
 answered on 01 Jul 2010
1 answer
119 views
Hi all,

I'm trying to use rotator in my application, but I noticed that it doesn't keep a constant size for its items, at start everything sits on its place, but while rotating the items tend to shift aside, is it a bug? I'll attach two screenshots, please take a look at them.

Many thanks

Giorgi
Fiko
Telerik team
 answered on 01 Jul 2010
1 answer
138 views
hello,
 trying to get you tooltip + calendar demo to work. i have everything working correctly aside from the toolTip display. It goes through its brief loading screen and then disappears without ever showing any of its content.

*page is referencing a nested master page that contains a ajaxscript manager not a radscript manager

page hosting calendar
<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/Default.Master" CodeBehind="Events.aspx.cs" Inherits="MemberPortal.UI.Web.Site.Events" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="ContentPlaceHolder1" runat="server">  
 
            <style type="text/css">  
                .style1  
                {  
                    width: 80%;  
                }  
                .style2  
                {  
                    width: 128px;  
                    height: 128px;  
                }  
                .style3  
                {  
                    width: 146px;  
                }  
                .style4  
                {  
                    font-family: Calibri;  
                    font-size: medium;  
                    color: #C0C0C0;  
                    border-left-color: #A0A0A0;  
                    border-right-color: #C0C0C0;  
                    border-top-color: #A0A0A0;  
                    border-bottom-color: #C0C0C0;  
                }  
                .Event  
        {  
            _ackground: #DFEEFF none repeat scroll 0 0;  
            background: #DFEEFF url(./Images/Appointment.png) center no-repeat;  
            border-color: #F6FAFF -moz-use-text-color #A7C0DF;  
            border-style: solid none;  
            border-width: 1px 0;  
        }  
            </style> 
            <table align="center" width="100%">  
                <tr> 
                    <td> 
                        &nbsp;  
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                       <telerik:RadCalendar Skin="Hay" ID="RadCalendar1" Width="400" Height="300"    
                    runat="server" OnDayRender="RadCalendar1_DayRender" > 
                </telerik:RadCalendar> 
                <telerik:RadToolTipManager Width="220px" Height="300px" RelativeTo="Element" ID="RadToolTipManager1" 
                    runat="server" OffsetX="15" Position="MiddleRight" ShowDelay="0" OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate" 
                    Skin="Hay">  
                </telerik:RadToolTipManager> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                         
                    </td> 
                </tr> 
            </table> 
 
     
</asp:Content> 
 

page host calendar code behind
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
using System.IO;  
using System.Data.SqlClient;  
using System.Configuration;  
using Tegrit.MemberPortal.UI.Web.Site.Views;  
 
namespace MemberPortal.UI.Web.Site  
{  
    public partial class Events : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                List<EventInformationModel> events = new List<EventInformationModel>();  
                MockService service = new MockService();  
                events = service.GetEvents();  
                Session["Events"] = events;  
            }  
        }  
 
        protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)  
        {  
            int ID = IsDayRegisteredForTooltip(e.Day.Date);  
            if (ID != -1)  
            {  
                TableCell cell = e.Cell;  
                cell.CssClass = "Event";  
                cell.Attributes.Add("id", "Calendar1_" + ID.ToString());  
                RadToolTipManager1.TargetControls.Add(e.Cell.Attributes["id"], ID.ToString().Substring(ID.ToString().IndexOf('_') + 1), true);  
            }  
        }  
 
        private int IsDayRegisteredForTooltip(DateTime date)  
        {  
            List<EventInformationModel> events = (List<EventInformationModel>)Session["Events"];  
            List<EventInformationModel> m = (from e in events  
                                             where e.Date == date  
                                             select e).ToList<EventInformationModel>();  
                if (m.Count > 0)  
                {  
                    return int.Parse(m[0].eventID.ToString());  
                }  
 
            return -1;  
 
            }  
 
        private EventInformationModel GetEventByID(int id)  
        {  
           List<EventInformationModel> events = (List<EventInformationModel>)Session["Events"];  
 
           EventInformationModel m = (from e in events  
                                            where e.eventID == id  
                                            select e).Single<EventInformationModel>();  
           return m;  
        }  
 
        protected void RadToolTipmanager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
        {  
            EventDetailsView details = (EventDetailsView)this.LoadControl("views/EventDetailsView.ascx");  
            int eventID = int.Parse(e.Value);  
            details.EventDetail = GetEventByID(eventID);  
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(details);  
        }  
    }  

user control for tooltip display
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EventDetailsView.ascx.cs" Inherits="MemberPortal.UI.Web.Site.Views.EventDetailsView" %> 
<style type="text/css">  
    .style1  
    {  
        width: 200px;  
        height: 118px;  
    }  
</style> 
<table id="Table1"  border="0" cellpadding="2" 
    cellspacing="0">  
    <tr> 
        <td style="text-align: center;" class="style1">  
 
              
                    Name:  
                    <asp:Label ID="lblName"  runat="server" Text='<%# Bind("Name") %>'></asp:Label><br /> 
                    Start:  
                    <asp:Label ID="lblStartTime"  runat="server" Text='<%# Bind("StartTime") %>'></asp:Label><br /> 
                    End:  
                    <asp:Label ID="lblStartTime2" runat="server" Text='<%# Bind("StartTime") %>'></asp:Label><br /> 
                    Person to meet with:  
                    <asp:Label ID="lblEndTime"  runat="server" Text='<%# Bind("EndTime") %>'></asp:Label><br /> 
                    <br /> 
 
        </td> 
    </tr> 
</table> 

page hosting tooltip dispaly code behind
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using MemberPortal.UI.DataTransferObjects.ContentManagement;  
 
namespace MemberPortal.UI.Web.Site.Views  
{  
    public partial class EventDetailsView : System.Web.UI.UserControl  
    {  
        private EventInformationModel eventDetail;  
 
        public EventInformationModel EventDetail  
        {  
            get { return eventDetail; }  
            set { eventDetail = value; }  
        }  
 
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            lblEndTime.Text = eventDetail.EndTime;  
            lblName.Text = eventDetail.Name;  
            lblStartTime.Text = eventDetail.StartTime;  
              
        }  
    }  
Svetlina Anati
Telerik team
 answered on 01 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?