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

RadToolTip on Appointment Context Menu

1 Answer 71 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
rugydp
Top achievements
Rank 1
rugydp asked on 21 Jul 2016, 08:06 AM

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, 

BUT:

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;
04.          
05.            if (e.MenuItem.Value == "CommandDetails")
06.            {
07.                string id = e.Appointment.ID.ToString();
08. 
09.                foreach (string domElementID in e.Appointment.DomElements)
10.                {
11.                    RadToolTipManager1.TargetControls.Add(domElementID, id, true);
12.                }
13. 
14.                RadToolTipManager1.Show();
15.            }
16.        }

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 21 Jul 2016, 09:38 AM

Hello,

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.

Regards,

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.
Tags
Scheduler
Asked by
rugydp
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or