2 RadTooltipManager on one page

10 posts, 0 answers
  1. Jay Mehta
    Jay Mehta avatar
    15 posts
    Member since:
    Jun 2009

    Posted 09 Dec 2009 Link to this post

    Hi,

    I am using 2 radtooltipmanager controls on my page, I have a grid, in which I am displaying employee ID and employee address, I have tool tip for both, 1 tooltipmanager for employeeId and another for employee address.

    Problem: both tooltips come fine if I hover over then alternately. Means, if I am hovering over employeeID it will show me that employees detail and if I hover over the address it will show me the address details. but now if I again hover over any other address, it caches the one which I hovered before it. Now, if I hover over the employee ID and then hover back over to the address, it will show me proper details. same problem on employeeID side, if I keep on hovering over the different employeeID it will show me details of the first one which I hovered.
    If I view them alternately it works fine.

    Can you please let me know what is wrong?

    Thank you,
    Jay Mehta.
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 14 Dec 2009 Link to this post

    Hello Jay Mehta,

     I built up a test demo based on your explanations but unfortunately to no avail - each tooltip shows the expected information. Would you please examine teh attached test demo and let me knwo what steps should I follow to reproduce the issue? In case you cannot replicate the problem with teh attached code, modify it in order to demonstrate the issue and paste the fully runnable source code along with detailed reproduction setps and I will build a sample which I can debug locally and I will do my best to help.


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cognitronic
    Cognitronic avatar
    11 posts
    Member since:
    Sep 2012

    Posted 20 Dec 2009 Link to this post

    I'm having a very similar problem.  I have two radgrids on a page, an orders and an order details.  In the orders grid i have two columns that are being added to a tooltip manager on the  ItemDatabound event.  Everything works fine. The order details grid is using the exact same method, but I only get the standard tooltip....not the radtooltip.  When I try to just add a tooltip to the gridtemplatecolumn, the actual tooltip panel shows, but with no data.

    Help!
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 22 Dec 2009 Link to this post

    Hi Cognitronic,

    I am not completely sure how exactly you populate the order details grid but I assume that a possible reason for the problem could be that you are populating the details grid with AJAX and you do not update the tooltip manager at the same time. Please, examine whether my assumption is correct and if so, make sure that you update the tooltip manager when needed.

    In case this is not the problem, I will really need to examine your particular setup - please prepare a sample, fully runnable reproduction demo (use a fake programmatic datasource for the grids or Northwind), open a new support ticket and send it to me along with very detailed reproduction steps and explanations of the actual and the desired result and I will help you achieve what you need.

    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Cognitronic
    Cognitronic avatar
    11 posts
    Member since:
    Sep 2012

    Posted 23 Dec 2009 Link to this post

    Hi Svetlina,

    Thanks for your response!  I've set the EnablePostBackOnRowClick property to true on the Orders grid.  When a user clicks on a row in the Orders grid, in the ItemCommand event (if the commandname is RowClicked) I load the Order Details grid by Order ID.  I am using the RadAjaxManager and I do have an AjaxSetting this is tying the Orders grid to the Order Details grid.  That said, I am adding the control I want to be "tooltipified" to the ToolTipManager's TargetControls collection in the Order Details OnItemDataBound event....is this the wrong place?


  7. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 25 Dec 2009 Link to this post

    Hi Cognitronic,

    I think that this event is the correct one to populate the RadToolTipManager's TargetControls collection. However, what I assume that is the problem is that you do not update the tooltip manager in the RadAjaxManager's AjaxSettings at that time. Try to set the OrderDetails grid to update the tooltip manager in the RadAjaxManager's markup settings and test again because otherwise if you debug the server code, the target controls will be populated but the updated tooltip manager will not be sent to the browser.

    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Cognitronic
    Cognitronic avatar
    11 posts
    Member since:
    Sep 2012

    Posted 31 Aug 2010 Link to this post

    Hi Svetlina,

    I know it's been awhile, but what event should I update the ToolTipManager control from?  I've tried from onitemcreated and onitemdatabound and it is still not working.   Thanks!!
  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 03 Sep 2010 Link to this post

    Hi Cognitronic,

    To correctly configure a tooltipified grid you should fulfil the following:

    1) The new values in the user control's content controls should be set in the user control's PreRender event.

    2) The targets should be added to the RadToolTipManager's TargetControls collection in the grid's  OnItemDataBound event.

    3) The TargetControls collection should be cleared when the grid is paged and sorted.

    4) If you have ajaxified the grid, you should add the tooltip manager to the same settings - e.g put the manager in the same update panel or add it to the same ajax settings of ajax manager where the grid is added.

    A sample demo is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx

    Kind regards,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. romdorn jorn
    romdorn jorn avatar
    1 posts
    Member since:
    Oct 2009

    Posted 08 Jan 2011 Link to this post

    Hello,

    I have a very similar problem.
     Different to my job to run Usercontrol.
     To be a problem  when Usercontrol have Textbox or Button.
     While the switch click to display the tooltip.

    <telerik:RadToolTipManager ID="RadToolTipManager1" 
        OffsetY="-1" 
        HideEvent="ManualClose"
        Width="700px" 
        Height="350px" 
        runat="server" 
        ShowEvent="OnClick"
        EnableShadow="true" 
        OnAjaxUpdate="OnAjaxUpdate" 
        RelativeTo="Element"
        Position="MiddleRight">
    </telerik:RadToolTipManager>
    <telerik:RadToolTipManager ID="RadToolTipManager2" 
        OffsetY="-1" 
        HideEvent="ManualClose"
        Width="500px" 
        Height="250px" 
        runat="server" 
        ShowEvent="OnClick"
        EnableShadow="true" 
        OnAjaxUpdate="OnAjaxUpdate2" 
        RelativeTo="Element"
        Position="MiddleRight">
    </telerik:RadToolTipManager>

    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
    {
        this.UpdateToolTipSta(args.Value, args.UpdatePanel);
    }
    protected void OnAjaxUpdate2(object sender, ToolTipUpdateEventArgs args)
    {
        this.UpdateToolTipFile(args.Value, args.UpdatePanel);
    }
    private void UpdateToolTipSta(string elementID, UpdatePanel panel)
    {
        Control ctrl = Page.LoadControl("../../UserControl/View/aaa.ascx");
        panel.ContentTemplateContainer.Controls.Add(ctrl);
        aaa view = (aaa)ctrl;
        view.TaskID = elementID;
    }
    private void UpdateToolTipFile(string elementID, UpdatePanel panel)
    {
        Control ctrl = Page.LoadControl("../../UserControl/View/bbb.ascx");
        panel.ContentTemplateContainer.Controls.Add(ctrl);
        bbb view = (bbb)ctrl;
        view.TaskID = elementID;
    }

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Control target = e.Item.FindControl("hlShowTrackingStatus");
            if (!Object.Equals(target, null))
            {
                if (!Object.Equals(this.RadToolTipManager1, null))
                {
                    //Add the button (target) id to the tooltip manager
                    this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("Sequence").ToString(), true);
                }
            }
            Control target2 = e.Item.FindControl("hlFileAttachments");
            if (!Object.Equals(target2, null))
            {
                if (!Object.Equals(this.RadToolTipManager2, null))
                {
                    //Add the button (target) id to the tooltip manager
                    this.RadToolTipManager2.TargetControls.Add(target2.ClientID, (e.Item as GridDataItem).GetDataKeyValue("Sequence").ToString(), true);
                }
            }
        }
    }

    help me please
    Thanks!
  11. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 12 Jan 2011 Link to this post

    Hi Jay Mehta,

     Your code seems to be correct and I cannot tell you what is causing the issue. I prepared a sample demo based on it and I attached it to the thread for your reference. Please, examine my demo and let me know what I should modify in order to reproduce the issue on my side and I will do my best to help.

    All the best,
    Svetlina
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017