RadToolTipManager + User Control within User Control

3 posts, 0 answers
  1. Kaushal
    Kaushal avatar
    47 posts
    Member since:
    Sep 2010

    Posted 19 Jan 2012 Link to this post


    I have some complicated scenario over here. I have one User control with one button, on click of this button modal popup is open up.
    I need electives from below:

    * Can same Panel control (Within modal popup) open in radtooltip? 


    * If I will make new user control and call this new user control as tooltip on parent user control's button?


    Kaushal Jani
  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 20 Jan 2012 Link to this post

    Hi Kaushal,

    The answer to your question depends on the current functionality you are using. As a quick answer - I believe placing your content in a user control will work out easily, yet please read through this post for several alternatives - the options for loading content in the RadToolTip or RadToolTipManager as I believe it will allow you to choose the scenario that best fits your needs:

    1) RadToolTip holds static content which you can place directly between its opening and closing tag. Thus if there isn't too much content you want to show in it you can simply move it so. This is explained in this help article: http://www.telerik.com/help/aspnet-ajax/tooltip-content.html. As you can see you can do this declaratively, or from the code-behind

    2) The RadToolTipManager loads its content when needed via an AJAX request. This is usually done by putting your content in a user control, as this is the simplest way - you just add code for one control. This is explained in this article: http://www.telerik.com/help/aspnet-ajax/tooltipmanager-ajaxupdate.html.

    You can also examine the online demos for the RadToolTIp to see the functionality of the control. I believe this one shows the difference between the two approaches clearly.

    A third, more complex option is to add an empty iframe in the RadToolTip and use the OnClientShow  event to change its src to the page you were previously loading. You could also add a global JS variable to use as flag so that you do not reload the content each time.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. DevCraft R3 2016 release webinar banner
  4. Kaushal
    Kaushal avatar
    47 posts
    Member since:
    Sep 2010

    Posted 20 Jan 2012 Link to this post

    Hi Marin,

    I really thank full to you for your reply. it helped me a lot to in my development.I followed your comments and I got result with below code.

    User Control 1: (In User Control 1 I am calling User Control 2 which will populate in radtooltip)

    <telerik:RadAjaxManagerProxy ID="ramRadAjaxManager" runat="server">
            <telerik:AjaxSetting AjaxControlID="pnlModal">
                    <telerik:AjaxUpdatedControl ControlID="rtlunits" LoadingPanelID="ralpRadAjaxLoadingPanel" />
    <div id="divMain" runat="server" style="height: 30px; display: block; margin: 3px;">
        <telerik:RadButton ID="btnShow" runat="server" AutoPostBack="True" ButtonType="StandardButton"
            Icon-PrimaryIconUrl="~/Images/Filter_Icon_0.gif" OnClick="btnShow_OnClick">
        <telerik:RadToolTip runat="server" ID="rttBuDisplay" Width="250px" Modal="true" TargetControlID="btnShow"
            ManualClose="true" Title="Another User Control">
            <telerik:RadAjaxPanel ID="rapBUDisplay" runat="server">
                <AnotherUCDisplay:AnotherUC ID="buDisplay" runat="server" />
    <asp:Panel ID="pnlMpMain" runat="server">
        <ajaxToolkit:ModalPopupExtender TargetControlID="hnfDummy" ID="mpeUnit"
            CancelControlID="imgbtnClose" runat="server" Enabled="True" BackgroundCssClass="modalBackground"
        <asp:HiddenField ID="hnfDummy" runat="server" />
        <asp:Panel ID="pnlModal" runat="server" Style="width: 500px;" CssClass="pop-up">
            <div class="pop-up-content" style="padding-bottom: 5px;">
                <div class="pop-up-top">
                        Select Bussiness Units:
                    <a href="#">
                        <asp:ImageButton ID="imgbtnClose" runat="server" Width="7" Height="8" border="0"
                            ToolTip="Close" AlternateText="Close" ImageAlign="AbsMiddle" ImageUrl="~/Images/close.png" />
                <fieldset style="margin: 0px 0px 0px 0px">
                    <telerik:RadTreeList ID="rtlunits" runat="server" DataKeyNames="Unit_ID"
                        ClientSettings-AllowPostBackOnItemClick="false" OnNeedDataSource="rtlunits_OnNeedDataSource"
                        ParentDataKeyNames="ParentUID" OnItemCreated="rtlunits_OnItemCreated"
                        AutoGenerateColumns="false" AllowMultiItemSelection="true">
                            <telerik:TreeListSelectColumn HeaderStyle-Width="38px" UniqueName="UnitCheckboxes">
                            <telerik:TreeListBoundColumn DataField="Unit_ID" HeaderText="Unit_ID"
                                Visible="false" UniqueName="Unit_ID" />
                            <telerik:TreeListBoundColumn DataField="LegalName" HeaderText="Name" UniqueName="LegalName" />
                            <Selecting UseSelectColumnOnly="true" AllowItemSelection="true" />
                            <ClientEvents OnItemSelected="OnClientNodeClicked" OnItemDeselected="OnClientNodeClicked" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="300" />

    Thanks Marin once again,

    Kaushal Jani
Back to Top