problem with position - RadToolTips with SumaryValidator in Grid

2 posts, 0 answers
  1. Carlos
    Carlos avatar
    1 posts
    Member since:
    Dec 2011

    Posted 19 Dec 2011 Link to this post


    I have one radgrid, when click in button for insert, the tooltips show me validationsumary, but when click button in update, the position of tooltips is not correct. And the tooltips insert to set position after click in button insert.

    I will have to set isClientId = true.... after this the problem with position for radtooltips

    Is this my code:

    <telerik:RadToolTip runat="server" ID="RadToolTipInsert" Position="TopLeft"
                            ShowEvent="FromCode" Width="400px" RelativeTo="Element"
                                    OnClientBeforeShow="CheckIfShowInsert" Skin="Sitefinity"
                                    ManualClose="True" Animation="Fade" EnableShadow="True"
                                    Title="<span class='MsgTextoToolTip'><b>  No es posible guardar debido a lo siguiente:</b></span> "
                            <asp:ValidationSummary ID="valSumaryInsert" runat="server"
                                    ValidationGroup="insert_group" />
                         <telerik:RadToolTip ID="RadToolTipUpdate" runat="server" Animation="Fade"
                                    EnableShadow="True" ManualClose="True" OnClientBeforeShow="CheckIfShowUpdate"
                                    Position="TopLeft" RelativeTo="Element" ShowEvent="FromCode" Width="400px"
                                    Title="<span class='MsgTextoToolTip'><b>  No es posible guardar debido a lo siguiente:</b></span> "
                                    RenderInPageRoot="True" IsClientID="True" TargetControlID="ToolTipsPositionEditMode"
                                    <asp:ValidationSummary ID="valSummaryUpdate" runat="server"
                                     ValidationGroup="update_group" />
                                                            <asp:ImageButton ID="btnUpdate" runat="server" BorderStyle="None"
                                                                BorderWidth="0px" commandname="Update"
                                                                ValidationGroup="update_group" onclientclick="ShowTooltipUpdate();"
                                                                ToolTip="Guardar los cambios realizados" />
                                                            <asp:ImageButton ID="btnInsert" runat="server" BorderStyle="None"
                                                                BorderWidth="0px" commandname="PerformInsert"
                                                                ValidationGroup="insert_group" onclientclick="ShowTooltipInsert()"
                                                                ToolTip="Agregar beneficiario al pedido" />
    function CheckIfShowInsert(sender, args) {
                       var summaryElem = document.getElementById("<%= valSumaryInsert.ClientID %>");
                       if ( == "none") {
                   function ShowTooltipInsert() {
                   window.setTimeout(function () {
                       var tooltip = $find("<%= RadToolTipInsert.ClientID %>")
                   }, 10);
                   function CheckIfShowUpdate(sender, args) {
                       var summaryElem = document.getElementById("<%= valSummaryUpdate.ClientID %>");
                       if ( == "none") {
                           //API: if there are no errors, do not show the tooltip
                   function ShowTooltipUpdate() {
                       var tooltip = $find("<%= RadToolTipUpdate.ClientID %>")
                       setTimeout( function ()
                       }, 20);

    i attach 2 images, the image one is working fine with insert, but image two a three is the problem i have.


    Bets Regards,
  2. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 20 Dec 2011 Link to this post

    Hi Carlos,

    I am not sure what is your exact setup, yet it seems that the target you set to the RadToolTip does not exisp - i.e. you set it to be the clientID so the RadToolTip looks for an HTML element with such an id, while such does not exist - controls placed in an INaming container have different IDs than the ones you set in the code-behind to avoid duplicating them. A prime example for this is any grid. Please examine the following demo which shows how to use separate RadToolTips in a grid: Note the second gridview - each row has its tooltip that uses server ids for its targets. In case you need to use only one tooltip outside of the grid I advise you examine the following sticky thread on setting its new target control (as it does not have one in the markup): You can easily pass a reference to the new target control to the client-side handler via the this keyword in the parentheses of the OnClientClick handler.

    Best wishes,
    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
Back to Top