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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I get Schedule ResourceName at radialmenu button click

Thread ID:

Created:

Updated:

Platform:

Replies:

120075 Aug 28,2015 07:47 AM UTC Sep 4,2015 11:21 AM UTC WinRT 3
loading
Tags: SfSchedule
Muhammad Mobeen
Asked On August 28, 2015 07:47 AM UTC

Hello,

I am having trouble getting Schedule Column's ResourceName at Radialmenu ADD button click. Can you guide me how can I achieve this.


Thanks

Vigneshkumar Ramasamy [Syncfusion]
Replied On August 31, 2015 12:23 PM UTC

Hi Muhammad,

Thanks for using Syncfusion product.

As now your requirement of getting Resource name through context menu can be achieved by using AppointmentEditorOpening event or ContextMenuOpening event. Based on your requirement we have created a simple sample using AppointmentEditorOpening event .Please find the sample in the below link.

Sample Link: Schedule_ResourceName

Note:

In the above sample we have displayed resource name using e.SelectedResource argument in the AppointmentEditorOpening event. Please refer the below code snippet.


async void schedule_AppointmentEditorOpening(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorOpeningEventArgs e)

        {

             string Rname = (e.SelectedResource[0] as Resource).DisplayName;

             MessageDialog MD= new MessageDialog("Selected resouce name="+Rname);

             await MD.ShowAsync();

        }


 


Please let us know if you have any concerns.

Regards,

Vigneshkumar R.


Muhammad Mobeen
Replied On September 2, 2015 09:08 AM UTC

Hello Vigneshkumar R,

Thanks for your kind reply. But in this demo I can't able to handle Delete button click.
Can you guide me how can I capture Delete event. I am not using Scheduler Default Editor.

My code is

 private void SfSchedule1_AppointmentEditorOpening_1(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorOpeningEventArgs e)
        {
            try
            {
                Appointment obj = (Appointment)e.Appointment;

                if (e.Action == EditorAction.Add)
                {
                    //for avoid showing of default editor
                    e.Cancel = true;
                    AddSchedulerAppointment(e);
                }
                else if (e.Action == EditorAction.Edit)
                {
                    //For avoid showing of default editor
                    e.Cancel = true;
                    EditAppointment((Appointment)e.Appointment);
                }
                else if (e.Action == EditorAction.Delete)
                {
                    e.Cancel = true;
                    CancelAppointment((Appointment)e.Appointment);
                }

            }
            catch (Exception ex)
            {  }
        }

ADD and Edit works fine but Delete not working.




Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On September 3, 2015 10:32 AM UTC

Hi Muhammad,


As of now we don’t have support for getting delete event from default Context menu of Schedule control. But your requirement can be achieved by overriding the default radial menu of Schedule. Please refer the below KB articles for more details

KB Link: http://www.syncfusion.com/kb/2686/how-to-customize-the-context-menu-in-sfschedule


Please let me know, if you have any query.


Regards,
Nijamudeen M.


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

;