radtooltip in a composite control

2 posts, 0 answers
  1. SK
    SK avatar
    14 posts
    Member since:
    Mar 2009

    Posted 21 Sep 2012 Link to this post

    I am trying to put RadToolTip in a composite control.. here is the code that I am trying to build....

    public class OCToolTip : CompositeControl
        {
            private RadToolTip tip;
            private Image image;
     
            [Localizable(false)]
            protected override void CreateChildControls()
            {
                this.Controls.Clear();
     
                tip = new RadToolTip();
                image = new Image();
                image.CssClass = "helpImage";
                this.Controls.Add(image);
                this.Controls.Add(tip);
                tip.TargetControlID = image.ID;
                tip.IsClientID = true;
                tip.ShowEvent = ToolTipShowEvent.OnClick;
                tip.OnClientBeforeShow = "ShowToolTip";
            }
     
            protected override void Render(HtmlTextWriter writer)
            {
                AddAttributesToRender(writer);
                tip.RenderControl(writer);
            }
     
        }


    It shows up the image but is not accepting the client click event. Any ideas what is wrong?

    Thanks
    SK

    PS: I also tried to create a user control for RadToolTip but that did not work, the idea is that I need to use a help icon in various parts of my program and want to use radtooltip for that, is there an alternate solution?
  2. SK
    SK avatar
    14 posts
    Member since:
    Mar 2009

    Posted 24 Sep 2012 Link to this post

    Never mind I made this a user control
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top