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

Help!!! Multiple RadTool tips in a same page

5 Answers 156 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Raj
Top achievements
Rank 1
Raj asked on 15 Sep 2008, 02:37 AM

Hi

My Rad tool tip is working perfectly fine as long as it is the only radtool tip in that page. If I have more than one radtool tips in a page only one tooltip is working.
My Radtool tip is created programmatically and added to a control and that control is added to the web part's control collection.

So when I have more than one web parts in a page only one web part's rad tool tip works. My code is below. Please tell me what I'm doing wrong here.

In the webpart I have this control called Link Bubble
<Controls:ContentHelp ID="LinkBubble" runat="server" ContentId="viewuploadfile" TargetControlID="WebPartHelpVerb">

</Controls:ContentHelp>

The above control's implementation is below.

using System;

using System.Text;

using System.Web.UI;

using System.Web;

using System.Xml;

using System.Xml.XPath;

using System.Configuration;

using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls;

using System.Collections.Generic;

using Telerik.Web.UI;

using AjaxControlToolkit;

using Cts.Bamboo.UI.Controls;

using Cts.Web.Issuer.Utilities;

namespace Cts.Web.Issuer.UI.Controls

{

    /// <summary>

    ///

    /// </summary>

    public class ContentHelp : CompositeControl

    {

        #region MODIFIERS

       

        private RadToolTip _radtooltip;

        private Cts.Bamboo.UI.Controls.ContentPanel _content;

        private string _controlPositioningStyleId = string.Empty;

        internal Parameter countryCode = new Parameter("country-code", TypeCode.String, (string)HttpContext.Current.Profile[ProfileVars.IssuerCountryCode]);

        #endregion

        /// <summary>

        ///

        /// </summary>

        public ContentHelp()

        { }

       

        #region PROPERTIES

        /// <summary>

        ///

        /// </summary>

        public string ContentId

        {

            get { base.EnsureChildControls(); return _content.SelectParameters[0].DefaultValue; }

            set { base.EnsureChildControls(); _content.SelectParameters[0].DefaultValue = value;}

        }

        /// <summary>

        ///

        /// </summary>

        public string TargetControlID

        {

            get { base.EnsureChildControls(); return _radtooltip.TargetControlID; }

            set { base.EnsureChildControls(); _radtooltip.TargetControlID = value; }

        }

        /// <summary>

        ///

        /// </summary>

        public string ControlPositioningStyleId

        {

            get { base.EnsureChildControls(); return _controlPositioningStyleId; }

            set { base.EnsureChildControls(); _controlPositioningStyleId = value; }

        }

      

        /// <summary>

        ///

        /// </summary>

        public RadToolTip Extender

        {

            get { base.EnsureChildControls(); return _radtooltip; }

        }

        #endregion

        #region DESIGNER CREATION

        /// <summary>

        ///

        /// </summary>

        protected override void CreateChildControls()

        {

            this.Controls.Clear();

           

            this._content = new Cts.Bamboo.UI.Controls.ContentPanel();

            this._content.ItemTemplate = new HelpTemplate(this);

            this._content.Source = "webpart-help";

            {

                QueryStringParameter helpIdparam = new QueryStringParameter("help-id", "help");

                this._content.SelectParameters.Add(helpIdparam);

                this._content.SelectParameters.Add(countryCode);

            }

            _radtooltip = new RadToolTip();

            _radtooltip.ID = "popup";

            _radtooltip.ShowEvent = ToolTipShowEvent.OnClick;

            _radtooltip.ShowDelay = 0;

            _radtooltip.ManualClose = true;

            _radtooltip.Position = ToolTipPosition.MiddleRight;

            _radtooltip.RelativeTo = ToolTipRelativeDisplay.Element;

            _radtooltip.TargetControlID = this.TargetControlID;

            _radtooltip.Controls.Add(this._content);

            _radtooltip.Animation = ToolTipAnimation.FlyIn;

            

            this.Controls.Add(this._radtooltip);

            this.ChildControlsCreated = true;

        }

        #endregion

        #region PRE-RENDER

        /// <summary>

        ///

        /// </summary>

        /// <param name="e"></param>

        protected override void OnPreRender(EventArgs e)

        {

            base.OnPreRender(e);

            if (((HelpTemplate)this._content.ItemTemplate).Nav.ToString() != "")

            {

                ((System.Web.UI.WebControls.WebParts.WebPart)Parent).HelpUrl = ((HelpTemplate)this._content.ItemTemplate).Nav.ToString();

            }          

        }

        #endregion

        /// <summary>

        ///

        /// </summary>

        /// <param name="writer"></param>

        protected override void Render(HtmlTextWriter writer)

        {

            if (string.IsNullOrEmpty(ControlPositioningStyleId))

            {

                ControlPositioningStyleId = "bubble-wrapper";

            }

            writer.AddAttribute(HtmlTextWriterAttribute.Class, ControlPositioningStyleId);

            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            base.RenderChildren(writer);

            writer.RenderEndTag();

        }

        #region INNER CLASS HELP TEMPLATE

        private class HelpTemplate : ITemplate

        {

            #region modifiers and properties

            string morehelptext = string.Empty;

            string title = string.Empty;

            string shortdescription = string.Empty;

            string navigationalurl = string.Empty;

            string longdescription = string.Empty;

            string longdescriptionurl = string.Empty;

            string navurl = string.Empty;

            private ContentHelp _help;

            public HelpTemplate(ContentHelp help)

            {

                this._help = help;               

            }

            public ContentHelp HelpContent

            {

                get { return _help; }

                set { _help = value; }

            }

            public string Nav

            {

                get { return navurl; }

                set { navurl = value; }

            }

            #endregion

            void ITemplate.InstantiateIn(Control container)

            {  

                container.DataBinding += delegate

                {

                    //container that holds the text

                    object dataItem = ((IDataItemContainer)container).DataItem;

                    #region web content values

                    //'More Help' text

                    morehelptext = (string)HttpContext.GetGlobalResourceObject("Issuer/Help", "/Issuer/Help/Url");

                    XPathNavigator nav = ((IXPathNavigable)dataItem).CreateNavigator();

                   

                    //title

                    if (nav.Select("title").Count > 0) //if "title" node exist

                    {

                        title = (String)nav.SelectSingleNode("title").ToString();

                    }

                    //url

                    if (nav.Select("url").Count > 0) //if url node exist

                    {

                        navigationalurl = nav.SelectSingleNode("url").Value.Trim();                       

                    }

                    //short description

                    if (nav.Select("short-description").Count > 0) //if "short-description" node exist

                    {

                        shortdescription = nav.SelectSingleNode("short-description").Value.Trim();

                    }

                    //long description

                    if (nav.Select("long-description").Count > 0) //if "long-description" node exist

                    {

                        longdescription = nav.SelectSingleNode("long-description").Value.Trim();

                    }

                    // long dscriontion utl

                    if (ConfigurationSettings.AppSettings["HelpLongDescURL"] != null)

                    {

                        longdescriptionurl = ConfigurationSettings.AppSettings["HelpLongDescURL"].ToString();

                    }

                    #endregion

                    #region Test only

                    //@@@@@@@@@@@TEST ONLY........................

                    //longdescription = "";

                    //shortdescription = "";

                    //navigationalurl = "http://computershare.com/";

                    //title = "";

                    //navigationalurl = "";

                    //@@@@@@@@@@@TEST ONLY........................

                    //string  val = (string)System.Web.HttpContext.Current.Profile.GetPropertyValue("CountryCode");

                    #endregion

                    #region main content

                    Literal bubbleMainLtrl = new Literal();

                    bubbleMainLtrl.Text = "<h5>" + this.title + "</h5>" + this.shortdescription;

                    container.Controls.Add(bubbleMainLtrl);

                    HtmlGenericControl utltext = new HtmlGenericControl();

                    LiteralControl urrLtrl = new LiteralControl("</div><div class=\"bubblelink\">");

                    #endregion

                    #region logic

                    //applying the logic

                    if (navigationalurl != string.Empty) //if there is a url : display url

                    {

                        if (this.shortdescription != string.Empty || this.title != string.Empty)

                        {

                            Nav = navigationalurl;

                            urrLtrl.Text = "<a href='" + navigationalurl + "' originalAttribute="href" originalPath="" + navigationalurl + "" originalAttribute="href" originalPath="" + navigationalurl + "" >" + morehelptext + "</a>";

                            utltext.Controls.Add(urrLtrl);

                            container.Controls.Add(utltext);

                        }

                        else

                        {

                            Nav = navigationalurl;

                            this.HelpContent._radtooltip.Enabled = false;                           

                        }                       

                    }

                    else if (longdescription != string.Empty)

                    {

                        //short desc

                        if (this.shortdescription != string.Empty)

                        {

                            if (this.HelpContent.ContentId != null)

                            {

                                //urrLtrl.Text = "<a href='" + longdescriptionurl + this.HelpContent.ContentId + "' originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" >" + morehelptext + "</a>";

                                urrLtrl.Text = "<a href='" + longdescriptionurl + this.HelpContent.ContentId + "' originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" originalAttribute="href" originalPath="" + longdescriptionurl + this.HelpContent.ContentId + "" target='_blank' >" + morehelptext + "</a>";

                                utltext.Controls.Add(urrLtrl);

                                container.Controls.Add(utltext);

                                Nav = longdescriptionurl + this.HelpContent.ContentId;                               

                            }

                            else

                            {

                                //disable the bubble

                                this.HelpContent._radtooltip.Enabled = false;

                            }

                        }

                        else //no short description only long description

                        {

                            if (this.HelpContent.ContentId != null)

                            {

                                //System.Web.HttpContext.Current.Response.Redirect(longdescriptionurl + this.HelpContent.ContentId, false);

                                Nav = longdescriptionurl + this.HelpContent.ContentId;

                                this.HelpContent._radtooltip.Enabled = false;

                            }

                        }

                    }

                    else //if no long desc and no url

                    {

                        if (shortdescription == string.Empty) //no short desc

                        {

                            this.HelpContent._radtooltip.Enabled = false;

                        }

                        else

                        {    /*dislpay the short description only*/       }

                    }

                    #endregion

                    this._help._radtooltip.Title = this.title;

                    this._help._radtooltip.Text = this.shortdescription + "<br />" + urrLtrl.Text;

                };

            }

        }

        #endregion

    }

}

<

Controls:ContentHelp ID="LinkBubble1" runat="server" ContentId="viewuploadfile1" TargetControlID="WebPartHelpVerb">

</

Controls:ContentHelp>

<Controls:ContentHelp ID="LinkBubble2" runat="server" ContentId="viewuploadfile2" TargetControlID="WebPartHelpVerb">

</

Controls:ContentHelp>

only one of them is work. Please help

Thanks

Raj

5 Answers, 1 is accepted

Sort by
0
Raj
Top achievements
Rank 1
answered on 16 Sep 2008, 06:25 AM
can anybody in telirik team please replay to this question
0
Raj
Top achievements
Rank 1
answered on 16 Sep 2008, 06:25 AM
can anybody in telirik team please replay to this question?
0
Svetlina Anati
Telerik team
answered on 16 Sep 2008, 04:05 PM
Hello Raj,

Only a single tooltip might be visible at any given time. This behavior is by design and will not be changed as changing it would defy the purpose of the control.

The purpose of a tooltip is to provide additional information for a given element. It is not meant to be used as a popup control or as a draggable panel. For this purpose we provide RadWindow and RadDock controls. Both of these controls allow more than one visible element of the kind on the page.

Our suggestion is to consider using RadWindow and RadDock controls.



All the best,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Raj
Top achievements
Rank 1
answered on 16 Sep 2008, 09:17 PM
You might have understood my requirements in correctly. I do not need multiple tool tips to be displayed at any given time. I need one tool tip to be displayed at a time. For example see the RadToolTipManager behaviour. http://demos.telerik.com/ASPNET/Prometheus/ToolTip/Examples/ToolTipManager/DefaultCS.aspx. This exactly the behaviour I want. I tried using RadToolTipManager. But I do not how to dynamically add my TargetControl to the RadToolTipManager. Please see my code below with RadToolTipManager. You see target control is hard coded. i don't know how to retrieve the client id of my target control. and then add dynamically to the RadMgr. Please help?

using System;

using System.Text;

using System.Web.UI;

using System.Web;

using System.Xml;

using System.Xml.XPath;

using System.Configuration;

using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls;

using System.Collections.Generic;

using Telerik.Web.UI;

using AjaxControlToolkit;

using Cts.Bamboo.UI.Controls;

using Cts.Web.Issuer.Utilities;

[assembly: WebResource(Cts.Web.Issuer.UI.Controls.ContentHelp.BubbleScript, "text/javascript")]

namespace Cts.Web.Issuer.UI.Controls

{

    /// <summary>

    ///

    /// </summary>

    public class ContentHelp : CompositeControl

    {

        #region MODIFIERS

        //private PopupControlExtender _extender;

        private RadToolTip _radtooltip;

        private RadToolTipManager _radMgr;

        private string target;

        private Cts.Bamboo.UI.Controls.ContentPanel _content;

        private string _controlPositioningStyleId = string.Empty;

        internal const string BubbleScript = "Cts.Web.Issuer.UI.Controls.BubbleScript.BubbleScript.js";

        internal Parameter countryCode = new Parameter("country-code", TypeCode.String, (string)HttpContext.Current.Profile[ProfileVars.IssuerCountryCode]);

        #endregion

        public ContentHelp()

        { }

        #region PROPERTIES

        public string ContentId

        {

            get { base.EnsureChildControls(); return _content.SelectParameters[0].DefaultValue; }

            set { base.EnsureChildControls(); _content.SelectParameters[0].DefaultValue = value; }

        }

        public string TargetControlID

        {

            get { base.EnsureChildControls(); return target; }

            set { base.EnsureChildControls(); target = value; }

        }

        public string ControlPositioningStyleId

        {

            get { base.EnsureChildControls(); return _controlPositioningStyleId; }

            set { base.EnsureChildControls(); _controlPositioningStyleId = value; }

        }

        //public PopupControlExtender Extender

        //{

        //    get { base.EnsureChildControls(); return _extender; }

        //}

        public RadToolTipManager Extender

        {

            get { base.EnsureChildControls(); return _radMgr; }

        }

        #endregion

        #region DESIGNER CREATION

        protected override void CreateChildControls()

        {

            this.Controls.Clear();

            //this._extender = new PopupControlExtender();

            //this._extender.ID = "popup";

            ////this._extender.Position = PopupControlPopupPosition.Bottom;

            ////this._extender.OffsetX = -180;

            ////this._extender.OffsetY = -89;

            //this._extender.PopupControlID = "Panel1";         

            //Panel panel = new Panel();

            //panel.CssClass = "bubble";

            //panel.ID = "Panel1";

            //LiteralControl top = new LiteralControl("<div class=\"bt\"></div><div class=\"mid\">");

            //panel.Controls.Add(top);

            this._content = new Cts.Bamboo.UI.Controls.ContentPanel();

            this._content.ItemTemplate = new HelpTemplate(this);

            this._content.Source = "webpart-help";

            {

                QueryStringParameter helpIdparam = new QueryStringParameter("help-id", "help");

                this._content.SelectParameters.Add(helpIdparam);

                //Parameter countryCode = new Parameter("country-code");

                //countryCode.DefaultValue = "AU";

                this._content.SelectParameters.Add(countryCode);

            }

            //panel.Controls.Add(this._content);

            //LiteralControl bottom = new LiteralControl("</div><div class=\"bb\"><div class=\"bcall\"></div></div>");

            //panel.Controls.Add(bottom);

            //this.Controls.Add(this._extender);

            //this.Controls.Add(panel);

            //_radtooltip = new RadToolTip();

            //_radtooltip.ID = "popup";

            //_radtooltip.ShowEvent = ToolTipShowEvent.OnClick;

            //_radtooltip.ShowDelay = 0;

            //_radtooltip.ManualClose = true;

            //_radtooltip.Position = ToolTipPosition.MiddleRight;

            //_radtooltip.RelativeTo = ToolTipRelativeDisplay.Element;

            //_radtooltip.TargetControlID = "ctl00_ctl00_wpmanager_ViewUploadedFilesPart1_WebPartHelpVerb";

            //_radtooltip.Controls.Add(this._content);

            //_radtooltip.Animation = ToolTipAnimation.FlyIn;

            //this.Controls.Add(this._radtooltip);

            _radMgr = new RadToolTipManager();

            _radMgr.TargetControls.Add("ctl00_ctl00_wpmanager_ViewUploadedFilesPart1_WebPartHelpVerb", true);

            _radMgr.TargetControls.Add("ctl00_ctl00_wpmanager_UploadFilePart_WebPartHelpVerb", true);

            _radMgr.ShowEvent = ToolTipShowEvent.OnClick;

            _radMgr.Controls.Add(this._content);

            this.Controls.Add(_radMgr);

            this.ChildControlsCreated = true;

        }

        #endregion

        #region PRE-RENDER

        protected override void OnPreRender(EventArgs e)

        {

            base.OnPreRender(e);

            if (((HelpTemplate)this._content.ItemTemplate).Nav.ToString() != "")

            {

                ((System.Web.UI.WebControls.WebParts.WebPart)Parent).HelpUrl = ((HelpTemplate)this._content.ItemTemplate).Nav.ToString();

            }

            //Temp fix to get the dash borad catalogue works : Scriv/Bamboo is working on a perm. solution - Raj 13/8/2008

            //if (this.Parent.FindControl(this._radMgr.TargetControlID) != null)

            //{

            //    StringBuilder scriptBuilder = new StringBuilder();

            //    scriptBuilder.Append("bubbleUtil.initBubbleTarget('" + this.Parent.FindControl(this._radMgr.TargetControlID).ClientID + "','" + _radtooltip.ClientID + "');\r\n");

            //    this.Page.ClientScript.RegisterClientScriptResource(typeof(ContentHelp), BubbleScript);

            //    this.Page.ClientScript.RegisterStartupScript(typeof(ContentHelp), this.ClientID, scriptBuilder.ToString(), true);

            //}

            ////Temp fix to get the dash borad catalogue works : Scriv/Bamboo is working on a perm. solution - Raj 12/8/2008

            //else

            //{

            //    //this._radMgr.TargetControls. = "WebPartHelpVerb";

            //}

        }

        #endregion

        protected override void Render(HtmlTextWriter writer)

        {

            if (string.IsNullOrEmpty(ControlPositioningStyleId))

            {

                ControlPositioningStyleId = "bubble-wrapper";

            }

            writer.AddAttribute(HtmlTextWriterAttribute.Class, ControlPositioningStyleId);

            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            base.RenderChildren(writer);

            writer.RenderEndTag();

        }

        #region INNER CLASS HELP TEMPLATE

        private class HelpTemplate : ITemplate

        {

            #region modifiers and properties

            string morehelptext = string.Empty;

            string title = string.Empty;

            string shortdescription = string.Empty;

            string navigationalurl = string.Empty;

            string longdescription = string.Empty;

            string longdescriptionurl = string.Empty;

            string navurl = string.Empty;

            private ContentHelp _help;

            public HelpTemplate(ContentHelp help)

            {

                this._help = help;

            }

            public ContentHelp HelpContent

            {

                get { return _help; }

                set { _help = value; }

            }

            public string Nav

            {

                get { return navurl; }

                set { navurl = value; }

            }

            #endregion

            void ITemplate.InstantiateIn(Control container)

            {

                container.DataBinding += delegate

                {

                    //container that holds the text

                    object dataItem = ((IDataItemContainer)container).DataItem;

                    #region web content values

                    //'More Help' text

                    morehelptext = (string)HttpContext.GetGlobalResourceObject("Issuer/Help", "/Issuer/Help/Url");

                    XPathNavigator nav = ((IXPathNavigable)dataItem).CreateNavigator();

                    //title

                    if (nav.Select("title").Count > 0) //if "title" node exist

                    {

                        title = (String)nav.SelectSingleNode("title").ToString();

                    }

                    //url

                    if (nav.Select("url").Count > 0) //if url node exist

                    {

                        navigationalurl = nav.SelectSingleNode("url").Value.Trim();

                    }

                    //short description

                    if (nav.Select("short-description").Count > 0) //if "short-description" node exist

                    {

                        shortdescription = nav.SelectSingleNode("short-description").Value.Trim();

                    }

                    //long description

                    if (nav.Select("long-description").Count > 0) //if "long-description" node exist

                    {

                        longdescription = nav.SelectSingleNode("long-description").Value.Trim();

                    }

                    // long dscriontion utl

                    if (ConfigurationSettings.AppSettings["HelpLongDescURL"] != null)

                    {

                        longdescriptionurl = ConfigurationSettings.AppSettings["HelpLongDescURL"].ToString();

                    }

                    #endregion

                    #region Test only

                    //@@@@@@@@@@@TEST ONLY........................

                    //longdescription = "";

                    //shortdescription = "";

                    //navigationalurl = "http://computershare.com/";

                    //title = "";

                    //navigationalurl = "";

                    //@@@@@@@@@@@TEST ONLY........................

                    //string  val = (string)System.Web.HttpContext.Current.Profile.GetPropertyValue("CountryCode");

                    #endregion

                    #region main content

                    Literal bubbleMainLtrl = new Literal();

                    bubbleMainLtrl.Text = "<h5>" + this.title + "</h5>" + this.shortdescription;

                    container.Controls.Add(bubbleMainLtrl);

                    HtmlGenericControl utltext = new HtmlGenericControl();

                    LiteralControl urrLtrl = new LiteralControl("</div><div class=\"bubblelink\">");

                    #endregion

                    #region logic

                    //applying the logic

                    if (navigationalurl != string.Empty) //if there is a url : display url

                    {

                        if (this.shortdescription != string.Empty || this.title != string.Empty)

                        {

                            Nav = navigationalurl;

                            urrLtrl.Text = "<a href = '" + navigationalurl + "' >" + morehelptext + "</a>";

                            utltext.Controls.Add(urrLtrl);

                            container.Controls.Add(utltext);

                        }

                        else

                        {

                            Nav = navigationalurl;

                            this.HelpContent._radMgr.Enabled = false;

                        }

                    }

                    else if (longdescription != string.Empty)

                    {

                        //short desc

                        if (this.shortdescription != string.Empty)

                        {

                            if (this.HelpContent.ContentId != null)

                            {

                                //urrLtrl.Text = "<a href = '" + longdescriptionurl + this.HelpContent.ContentId + "' >" + morehelptext + "</a>";

                                urrLtrl.Text = "<a href = '" + longdescriptionurl + this.HelpContent.ContentId + "' target='_blank' >" + morehelptext + "</a>";

                                utltext.Controls.Add(urrLtrl);

                                container.Controls.Add(utltext);

                                Nav = longdescriptionurl + this.HelpContent.ContentId;

                            }

                            else

                            {

                                //disable the bubble

                                this.HelpContent._radMgr.Enabled = false;

                            }

                        }

                        else //no short description only long description

                        {

                            if (this.HelpContent.ContentId != null)

                            {

                                //System.Web.HttpContext.Current.Response.Redirect(longdescriptionurl + this.HelpContent.ContentId, false);

                                Nav = longdescriptionurl + this.HelpContent.ContentId;

                                this.HelpContent._radMgr.Enabled = false;

                            }

                        }

                    }

                    else //if no long desc and no url

                    {

                        if (shortdescription == string.Empty) //no short desc

                        {

                            this.HelpContent._radMgr.Enabled = false;

                        }

                        else

                        { /*dislpay the short description only*/       }

                    }

                    #endregion

                    //this._help._radtooltip.Title = this.title;

                    //this._help._radtooltip.Text = this.shortdescription + "<br />" + urrLtrl.Text;

                    this._help._radMgr.Title = this.title;

                    this._help._radMgr.Text = this.shortdescription + "<br />" + urrLtrl.Text;

                };

            }

        }

        #endregion

    }

}

0
Svetlina Anati
Telerik team
answered on 19 Sep 2008, 12:41 PM
Hello Raj,

Your original question as the thread's title is for a problem with showing RadToolTip when there are more than one instance of your custom control on the page. I tested it and I was not able to reproduce it.

As to your second question, please note that it is not directly related to RadControls. I am also not sure how exactly you want to set the id - through a property as done with the RadToolTip, through a method, etc. Basically, you can extract a control's ClientID on the server by using the structure Control.ClientID and set it server-side to your custom control.


Greetings,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Raj
Top achievements
Rank 1
Answers by
Raj
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or