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

radtooltip deattach bug

1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Alvaro asked on 29 Aug 2008, 03:00 PM
Hi there,

Im currently using radtooltip with a templated databinded button, the event must check some and shows the tooltip, everything works ok, but when another button fires the event and the condition does not match the tooltip still appearing, I digg on the demos site and find this im trying to implement the js code described for that situation but the object SYS throws an exception, do you have any other solution for that bug,

thanks in advance


here is the code:

<telerik:RadGrid ID="rgPersonasBloqueadas" runat="server" AllowPaging="True" AllowSorting="True" 
        GridLines="None" ShowGroupPanel="True" OnGroupsChanging="rgPersonasBloqueadas_GroupsChanging" 
                <HeaderStyle Width="20px"></HeaderStyle> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                        <asp:Button ID="btnMostrarCliente" runat="server" CausesValidation="false" CommandName="Select" CommandArgument='<%# obtenerCriterio(Eval("Identificacion"),Eval("CodigoAlmacen"))%>' Text="..."/>                          
                        <telerik:RadToolTip ID="rttMensaje" runat="server" Skin="Vista" ManualClose="true" ContentScrolling="Auto" RelativeTo="Element" Width="250px" Height="50px" Sticky="true" IsClientID="true"></telerik:RadToolTip> 
        <ClientSettings AllowDragToGroup="True">  
        <FilterMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
the code behind of item command
 protected void rgPersonasBloqueadas_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        switch (e.CommandName)  
            case "Select":  
                GridDataItem item = e.Item as GridDataItem;  
                if (!clienteBloqueado(e.CommandArgument.ToString()))  
                    RadWindow rnd = new RadWindow();  
                    rnd.ID = "rwInfoUsuario";  
                    rnd.Modal = true;  
                    rnd.VisibleOnPageLoad = true;  
                    rnd.Behaviors = WindowBehaviors.Close | WindowBehaviors.Move;  
                    rnd.Width = Unit.Pixel(800);  
                    rnd.Height = Unit.Pixel(600);  
                    rnd.NavigateUrl = "~/Paginas/InfoUsuario.aspx?ID=" + e.CommandArgument.ToString();  
                else if (item["UsuarioEnUso"].Text != HttpContext.Current.User.Identity.Name)  
                    ((RadToolTip)e.Item.FindControl("rttMensaje")).TargetControlID = ((Button)e.Item.FindControl("btnMostrarCliente")).ClientID;  
                    ((RadToolTip)e.Item.FindControl("rttMensaje")).Text = "El usuario " + item["UsuarioEnUso"].Text + " se encuentra llamando actualmente a este cliente.";  
                    ((Button)e.Item.FindControl("btnMostrarCliente")).Enabled = false;  

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 01 Sep 2008, 08:36 AM
Hello Alvaro,

We are not very sure where the problem is, but looking at your code we notice that you call the RadToolTip's Show() method if one of the possible conditions is true.

The implementation of the Show() method simply sets the tooltip's VisibleOnPageLoad property to true. Since property state is maintained in the ViewState, next time you reload the page, it will still cause the tooltip to be shown. We logged this behavior for fixing, as it is not intuitive.

For the time being, as a workaround, we suggest setting the property to false in the beginning of your
rgPersonasBloqueadas method.

((RadToolTip)e.Item.FindControl("rttMensaje")).VisibleOnPageLoad = false;

Sincerely yours,
the Telerik team

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