Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
119723 | Jul 24,2015 01:26 PM UTC | Jul 27,2015 10:04 AM UTC | WinRT | 1 |
![]() |
Tags: SfSchedule |
I am using SfSchedule control for calendar views. I can’t differentiate between the context menu popping up if I click on "All day" row or "12PM" row. Because from ContextMenuOpening event I get back only currentSelectedDate from ContextMenuOpeningEventArgs paramete. But it will be 12PM for a click from "All day" event row also. So I am not able to make the difference, when is all day row clicked and when is 12PM row clicked!? Let me know whether there is a way for me to differentiate between these two cases. Thanks in advance!
Hi
Shashanka,
Thanks
for using Syncfusion product.
As
of now we don’t have any direct support to differentiate the ContextMenuOpening
parameters when clicking in AllDay location .But your requirement can be
achieved by using CurrentEventArgs parameter in the ContextMenuOpening event
.Please find the below code snippet.
C#
private
async
void
schedule_ContextMenuOpening(object
sender, Syncfusion.UI.Xaml.Schedule.ContextMenuOpeningEventArgs
e) { var
originalSource = e.CurrentEventArgs.OriginalSource; var
allDayItemsControl = (originalSource as
FrameworkElement).FindParentElementOfType<ScheduleAllDaysAppointmentItemsControl>(); bool
isAllDayClicked = allDayItemsControl != null; if
(isAllDayClicked) { MessageDialog
msgDialog = new
MessageDialog("This
is AllDay"); await
msgDialog.ShowAsync(); }
} |
We
have created simple sample based on your requirement, Please find the sample in
the below link.
Sample
Link: AllDay_ContextMenu
Please
let us know if you have any concerns
Regards
Vigneshkumar
R
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
or the page will be automatically redirected to sign-in page in 10 seconds.