- Home
- Forum
- ASP.NET Core - EJ 2
- How to use the menu in the schedule?
How to use the menu in the schedule?
I want to display 3 schedule controls in my page, and 3 schedules have their own context menu. What should I do?
SIGN IN To post a reply.
3 Replies
NR
Nevitha Ravi
Syncfusion Team
January 18, 2019 07:18 AM UTC
Hi Pomelobutter,
Thank you for contacting Syncfusion Support.
We have prepared a sample by integrating context menu within our Scheduler which can be downloaded from the following link.
In the above sample we have rendered three scheduler in a page and integrate context menu for them.
Kindly refer the samples and let us know if you need any further assistance.
Regards,
Nevitha
PO
pomelobutter
January 18, 2019 07:40 AM UTC
Hi, thank you for your reply, I now want to right-click on the time grid on the schedule and get all the information on this cell. Can these be obtained?
KK
Karthigeyan Krishnamurthi
Syncfusion Team
January 21, 2019 11:45 AM UTC
Hi Pomelobutter,
Thanks for your update.
We have modified our previous sample to display the menu item Cell details only on cell click and by clicking that menu, cell details can be retrieved using getCellDetails function as shown below.
|
menuItems.Add(new
{
text = "Cell details",
iconCss = "e-icons today",
id = "details"
});
function onContextMenuBeforeOpen1(args) {
var newEventElement = document.querySelector('.e-new-event');
if (newEventElement) {
ej.base.remove(newEventElement);
ej.base.removeClass([document.querySelector('.e-selected-cell')], 'e-selected-cell');
}
var targetElement = args.event.target;
if (ej.base.closest(targetElement, 'contextmenu1')) {
return;
}
selectedTarget = ej.base.closest(targetElement, '.e-appointment,.e-work-cells,' +
'.e-vertical-view .e-date-header-wrap .e-all-day-cells,.e-vertical-view .e-date-header-wrap .e-header-cells');
--------------
--------------
}
case 'details':
var cellDatails = scheduleObj.getCellDetails(scheduleObj.getSelectedElements().indexOf(selectedTarget) !== -1 ? scheduleObj.getSelectedElements() : selectedTarget); |
Regards,
Karthigeyan
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
PO pomelobutter
- Jan 17, 2019 09:16 AM UTC
- Jan 21, 2019 11:45 AM UTC