This is a migrated thread and some comments may be shown as answers.
RadToolTipManager, AjaxUpdate event not working.
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
aditya
Top achievements
Rank 1
aditya asked on 20 Aug 2019, 10:35 PM

I have a requirement to implement "Tooltip" in html table row. In order to implement Tooltip functionality i have used RadToolTipManager, here i am getting tooltip while hovering on html table row, but unable to populate value in the tooltip, as AjaxUpdate event which i have declared in Customer.ascx.cs file is not working -

RadToolTipManager1= this.Page.Master.FindControl("RadToolTipManager1") as RadToolTipManager
RadToolTipManager1.AjaxUpdate += new ToolTipUpdateEventHandler(RadToolTipManager_AjaxUpdate);

 

Please help me in calling AjaxUpdate event in Customer.ascx.cs file so that i can update my Tooltip with the values coming from DB without using webservice.

I am giving code that i tried to implement Tooltip functionality. for reference -

Master page -

<telerik:RadToolTipManager RenderMode="Lightweight" ID="RadToolTipManager1" Width="400px" Height="200px" ContentScrolling="Auto" HideEvent="ManualClose" RelativeTo="Element" Position="BottomCenter" runat="server" IgnoreAltAttribute="true"></telerik:RadToolTipManager>

 

In script Tooltip.js file - 

showToolTip: function (element) {
                var tooltipManager = telerikDemo.tooltipManager;
              
                //If the user hovers the image before the page has loaded, there is no manager created
                 if (!tooltipManager) return;
                 
                ////Find the tooltip for this element if it has been created  
                 var tooltip = tooltipManager.getToolTipByElement(element);
                //Create a tooltip if no tooltip exists for such element 
                if (!tooltip) {
                  tooltip = tooltipManager.createToolTip(element);
                  //Use the fact that the image was named after a country
                  //Extract the country name from the image, and set it as the value to be supplied to the web-service
                    tooltip.set_targetControlID(element.id)
                }
                //Let the tooltip's own show mechanism take over from here - execute the onmouseover just once
                  element.onmouseover = null;
                //show the tooltip
                setTimeout(function () {
                    tooltip.show();
                }, 10);
            }

 

Customer.ascx

<tr id="Amount" onmouseover='telerikDemo.showToolTip(this)'>
 <td>
<%# Decimal.Parse(Eval("Amount").ToString()) < 0 ? String.Format("({0:N})", Math.Abs(Decimal.Parse(Eval("Amount").ToString()))) :String.Format("{0:N}", Decimal.Parse(Eval("Amount").ToString()))%>
</td>
</tr>

 

Customer.ascx.cs

public partial class Customer: System.Web.UI.UserControl{
   protected RadToolTipManager RadToolTipManager1;
   
 protected void Page_Load(object sender, EventArgs e)
        {
            RadToolTipManager1= this.Page.Master.FindControl("RadToolTipManager1") as RadToolTipManager;
            RadToolTipManager1.AjaxUpdate += new ToolTipUpdateEventHandler(RadToolTipManager_AjaxUpdate);
          }
          protected void RadToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
          {

             AjaxUpdate is not working.

          }
}

 

I tried to implement above "Tooltip" functionality by referring below link.
https://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx

Thanks in advance.

Aditya


 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 23 Aug 2019, 02:51 PM
Hello Aditya,

I replied to your query in the formal support ticket. I suggest that we continue our technical conversation in the mentioned thread.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
aditya
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or