The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm using a Custom Context menu for the ScheduleControl Control and I want to do the following: Depending on where I right clicked on the schedulegrid (where the appointments are showed) I want to filter out some menu entries in my Context menu.
(For example: If I right click on a time slot where there is no appointment, some entries should be available only but if I right click on an appointment other entries should be available in my context menu etc.)
The base of the question, how to know that which appointment item is under the mouse when I right click.
JJJisha Joy Syncfusion Team February 24, 2009 05:01 AM UTC
Hi,
Thank you for interest in Syncfusion Products.
The deisired behavior can be achieved by handling ScheduleAppointmentClick event. Please see the code:
this.scheduleControl.ScheduleAppointmentClick += new ScheduleAppointmentClickEventHandler(scheduleControl_ScheduleAppointmentClick); this.scheduleControl.GetScheduleHost().ContextMenu.MenuItems.Clear();
void scheduleControl_ScheduleAppointmentClick(object sender, ScheduleAppointmentClickEventArgs e) { if (e.ClickType == ScheduleAppointmentClickType.RightClick) { this.contextMenuStrip1.Items.Clear(); if (e.Item != null) { this.contextMenuStrip1.Items.Add(e.Item.ToString()); this.contextMenuStrip1.Items.Add(e.ClickDateTime.ToString());