Tooltip working on mouseover but not for onclick event

5 posts, 0 answers
  1. Pradeep
    Pradeep avatar
    6 posts
    Member since:
    Jun 2011

    Posted 30 Jun 2011 Link to this post

    Hi, i am trying to fire a tooltip which contains few linkbuttons when i click a rad grid row. However buttons in the tooltip works fine on mouseover event but none of the buttons work when i change the showevent as "Onclick"
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 01 Jul 2011 Link to this post

    Hi Pradeep,

    I suggest that we continue the discussion in this thread.

      Please note that the RadToolTipManager loads its user control inside an update panel, which changes the behavior of postback buttons a bit. Yet I do not see how the ShowEvent has any effect on this. I tried reproducing this issue, but to no avail. You can find my test page attached and here is a video from my experiment: http://screencast.com/t/tQbO9NJo. As you can see the behavior is the same- both the client-side and the server-side events are fired properly.

    I would suggest that you examine the following demos:
    correctly adding tooltips and managing the targetcontrols collection: http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx.
    show events: http://demos.telerik.com/aspnet-ajax/tooltip/examples/showevent/defaultcs.aspx.
    the difference between the RadToolTip and RadToolTIpManager: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipversustooltipmanager/defaultcs.aspx.

    Also please try upgrading to the latest stable release (which is Q1 2011 SP2 at the moment, and in a couple of weeks comes the Q2 2011) and see if this fixes your issue.

    If this does not help I suggest that you open a support ticket and send us a simple, runnable project that isolates this behavior so we can inspect it and provide a more accurate answer.


    Regards,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pradeep
    Pradeep avatar
    6 posts
    Member since:
    Jun 2011

    Posted 01 Jul 2011 Link to this post

    Hi Marin,

    Thanks for a quick response.

    In my case i am using a RadToolTip control instead of a RadTooltipManager and i am not using any control as the target on my RadGrid's row instead i am using entire row as the target control. please check the below code

    <

     

     

    ItemTemplate>

     

     

     

    <asp:LinkButton ID="lbAppRole" runat="server" OnClick="lbApprole_Click" CommandName="Edit"></asp:LinkButton>

     

     

     

     

    <telerik:RadToolTip ID="tipforGrid" runat="server" ShowEvent="FromCode" ShowDelay="0" HideDelay="0" HideEvent="LeaveTargetAndToolTip" ManualClose="true"

     

     

     

    Animation="Slide" RelativeTo="Mouse" EnableShadow="true" Position="BottomCenter" TargetControlID="lbAppRole">

     

     

     

    <div>

     

     

     

    <table>

     

     

     

    <tr>

     

     

     

    <td>

     

     

     

    <asp:LinkButton ID="linkbtn" runat="server" OnClick="linkbtn_Click" ToolTip="Approve">

     

     

     

    <asp:Image ID="divLink" runat="server" ImageUrl="~/images/folder/img1.png" />

     

     

     

    </asp:LinkButton>

     

     

     

    </td>
    </tr>
    </table>
    </div>
    </itemtemplate>

    For Grid selectedindexchanged event

     

    foreach

     

     

    (GridItem gridItem in radGridReview.SelectedItems)

     

    {

     

     

    RadToolTip localtip =(RadToolTip)gridItem.FindControl("tipforGrid");

     

    localtip.TargetControlID = gridItem.FindControl(

     

    "tipforGrid").Parent.Parent.UniqueID;

     

     

     

    localtip.ShowEvent = ToolTipShowEvent.OnClick;

     

     

     

     

     

     

     

    localtip.Show();

     

     

     

     

     

    }

     

     


  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 04 Jul 2011 Link to this post

    Hi Pradeep,

    There is still no reason for the link button to not work. Here is a video from my experiment where everything works as expected. I incorporated your code in my page, and the only things I changed were that I set the RelaviteTo property to Element to make sure the tooltip is relative to the row, I changed the HideEvent to ManualClose, since the ManualClose property is obsolete, I added two labels to show the effect of the link buttons clicks. I also changed the TargetControlID property to point to the ClientID of the grid row and inject a script to show the tooltip on the client, since it is a client-side object, after all and it will get lost when the grid is rebound after the paging.

    Please compare your project with my page and try to locate the differences. If you are still experiencing difficulties I would suggest that you open a support ticket and send us a small sample that isolates your case so that we can debug it locally and pinpoint the cause.

    All the best,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Pradeep
    Pradeep avatar
    6 posts
    Member since:
    Jun 2011

    Posted 05 Jul 2011 Link to this post

    Hi Marin,

    Thanks for your efforts. That issue has been resolved. I have removed the tooltip from within the grid and placed it out side without giving any targetcontrolid at compile time instead i assigned its target as grid at run time. Here is the sample which worked for me.

     

     

    <telerik:RadToolTip ID="tipforGrid" runat="server" ShowEvent="FromCode" ShowDelay="0" HideEvent="LeaveTargetAndToolTip" ManualClose="true" Animation="None" RelativeTo="Element"

     

     

     

    EnableShadow="true" Position="BottomCenter">

     

    <

     

     

    div>

     

     

     

    <table>

     

     

     

    <tr>

     

     

     

    <td>

     

     

     

    <asp:LinkButton ID="linkButtonDivApprove" runat="server" OnClick="linkButtonApprove_Click" ToolTip="Approve">

     

     

     

    <asp:Image ID="divimageApprove" runat="server" ImageUrl="~/images/ART/check.png" />

     

     

     

    </asp:LinkButton>

     

     

     

    </td>

     

    </

     

     

    tr>

     

     

     

     

     

     

     

    </table>

     

     

     

     

     

     

     

    </div>

     

     

     

     

     

     

     

    </telerik:RadToolTip>

     

    CODE BEHIND
    ------------

    in radGridReview_SelectedIndexChanged event

     

     

    foreach (GridItem gridItem in radGridReview.SelectedItems)

     

    {

    tipforGrid.TargetControlID = gridItem.UniqueID;

    tipforGrid.Show();

    }


    and it worked well as i needed.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017