We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to differentiate between click on "All day" row and "12PM' row?

Thread ID:

Created:

Updated:

Platform:

Replies:

119723 Jul 24,2015 01:26 PM UTC Jul 27,2015 10:04 AM UTC WinRT 1
loading
Tags: SfSchedule
Shashanka Kulamarva
Asked On July 24, 2015 01:26 PM UTC

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!


Vigneshkumar Ramasamy [Syncfusion]
Replied On July 27, 2015 10:04 AM UTC

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


CONFIRMATION

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.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;