RadToolTip on Appointment Context Menu

2 posts, 0 answers
  1. rugydp
    rugydp avatar
    20 posts
    Member since:
    Jul 2014

    Posted 21 Jul 2016 Link to this post

    I have a RadScheduler where I want to show details in a ToolTip from a context menu "Details...".

    I got it all working, e.g. context menu is selectable, the code is called, data is being loaded and a tooltip is showing up, 


    The tooltip always load the same tooltip for one appointment no matter on which appointment I select the context menu. It seems like it doesn't promote the AppointmentId or it doesn't see which appointment was right-clicked. 

    Any hints?

    I have this code in 'AppointmentContextMenuItemClicked()  where I call .Show() on the RadToolTipManager:

    01.protected void RadSchedulerPlanning_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
    02.        {
    03.            AppointmentContextMenuItemClickedEventArgs args = e;
    05.            if (e.MenuItem.Value == "CommandDetails")
    06.            {
    07.                string id = e.Appointment.ID.ToString();
    09.                foreach (string domElementID in e.Appointment.DomElements)
    10.                {
    11.                    RadToolTipManager1.TargetControls.Add(domElementID, id, true);
    12.                }
    14.                RadToolTipManager1.Show();
    15.            }
    16.        }

  2. Marin Bratanov
    Marin Bratanov avatar
    4931 posts

    Posted 21 Jul 2016 Link to this post


    I suggest you employ a JavaScript function like the one from this demo to show the tooltip: http://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx.

    You can call it from the server by registering a script that will pass the necessary arguments (e.g., Target ID): http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/executing-javascript-code-from-server.

    Or, you can move the logic to the client-side entirely, depending on what you are after: http://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/client-side-programming/events/onclientappointmentcontextmenuitemclicking.

    You may also find interesting the following demo: http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx?product=tooltip.

    The server Show() method of the tooltip manager is a stub that comes from its base class. It cannot know which tooltip to show because a tooltip manager can potentially handle thousands of tooltips.


    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top