Radbutton and LinkButton inside RadToolTip

5 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 02 Apr 2013 Link to this post

    how do I put in a tooltip a button and a LinkButton that have to be used?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Apr 2013 Link to this post

    Hi,

    Please check the following mark-up which illustrates a RadToolTip with a RadButton and LinkButton inside it.

    ASPX:
    <telerik:RadButton ID="RadButton1" runat="server" Text="Mouse Over Here to show tooltip">
    </telerik:RadButton>
    <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="RadButton1"
        ManualClose="true" Width="200px" Height="100px" Position="BottomRight">
        <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton" OnClientClicked="OnClientClicked">
        </telerik:RadButton>
        <br />
        <br />
        <asp:LinkButton ID="LinkButton1" runat="server" Text="LinkButton"></asp:LinkButton>
    </telerik:RadToolTip>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 03 Apr 2013 Link to this post

    Hi,
    the your code function...now i posted the image, please to see it. ther's 2 problem:
    1)If you see the image that i posted, is possible approach, for example with the coordinates, the tooltip controlled object without using the position property?

    2) when i click on first button into radtooltip i call this code:
    Protected Sub LoadFoto_Click(sender As Object, e As System.EventArgs) Handles LoadFoto.Click
        Dim script As String = "function f(){$find(""" + RadWindowLoadprofile.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
    ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)
    End Sub

    when i close the radwindow RadWindowLoadprofile, no longer works the property HideEvent = "LeaveTargetAndToolTip," I can not click on the button inside the tooltip disappears immediately because

    Thank you bye
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Apr 2013 Link to this post

    Hi,

    1. I guess your first requirement is to display a RadtoolTip containing buttons as shown in the attachment. You can set the Position as TopCenter. Here is the code I tried.

    ASPX:
    <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="RadButton1" HideEvent="LeaveTargetAndToolTip"
        ManualClose="true" Width="200px" Height="60px" Position="TopCenter">
        <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton" OnClientClicked="OnClientClicked"
            OnClick="RadButton1_Click">
        </telerik:RadButton>
        <asp:LinkButton ID="LinkButton1" runat="server" Text="LinkButton"></asp:LinkButton>
    </telerik:RadToolTip>

    2. I guess your second issue like the RadToolTip is disappearing on RadWindow close. On RadWindow close as well as on RadButtonClick the RadToolTip is hidden. That is the default nature, So you can explicitly show the RadToolTip as follows. Please try the following code snippet.

    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        RadToolTip1.Show();
        string script = "function f(){$find(\"" + RadWindowLoadprofile.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
        ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
    }

    JavaScript:
    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            alert("RadButton Client Clicked");
        }
        function OnClientClose() {
            var radToolTip = $find('<%=RadToolTip1.ClientID %>');
            radToolTip.show();
        }
    </script>

    Thanks,
    Princy.
  6. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 04 Apr 2013 Link to this post

    ok the code works! but is possible to set the value of the position of the coordinates of the tooltip? For example in the first image posted the tooltip has a value of Position = "BottomCenter" ... but I wish you could see how the second image posted.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017