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.
Unfortunately, activation email could not send to your email. Please try again.

How to get the selected values

Thread ID:

Created:

Updated:

Platform:

Replies:

123511 Mar 23,2016 01:50 PM Mar 25,2016 08:30 AM Xamarin.Android 3
loading
Tags: SfSchedule
Ammar Al-Suhairy
Asked On March 23, 2016 01:50 PM

Hi,

I want to use Syncfusion schedule to create a booking by using Xamarin and I need to get the selected values like Hour, Minute, Day , Month, example: if I clicked on 24th March 18:00 these details I need to get as string objects.

Please let me know if I can get them!
Thank in advance .
Regards
Ammar



Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On March 24, 2016 01:08 AM

Hi Ammar,


Thanks for your interest in Syncfusion products.


Based on the given information, your requirement of getting selected cell values and appointment details can be achieved by triggering ScheduleCellTapped event in SfSchedule Xamarin. Please find the code example below.


Code Example:

C#:

        SfSchedule schedule;

        ScheduleAppointment selectedAppointment;

        string subject, location;

        DateTime selectedAppointmentStartTime, selectedAppointmentEndTime;


        public SchedulePage()

        {

            schedule = new SfSchedule();

            schedule.VerticalOptions = LayoutOptions.FillAndExpand;


            schedule.ScheduleView = ScheduleView.WeekView;

            schedule.ScheduleCellTapped += schedule_ScheduleCellTapped;

        }


       


        void schedule_ScheduleCellTapped(object sender, ScheduleTappedEventArgs args)

        {

            // Selected Cell Date Values;

            var dateTime = args.datetime.ToString();


            // Selected Appointment Values;

            if (args.selectedAppointment != null)

            {

                selectedAppointment = (ScheduleAppointment)args.selectedAppointment;

                subject = selectedAppointment.Subject.ToString();

                location = selectedAppointment.Location;

                selectedAppointmentStartTime = selectedAppointment.StartTime;

                selectedAppointmentEndTime = selectedAppointment.EndTime;

            }

           

        }



If the provided information does not meet your requirement, could you please provide us more information? It will be helpful for us to analyze on it and provide you a possible solution.

Please let us know, if you have any query.

Regards,
Nijamudeen M.


Ammar Al-Suhairy
Replied On March 24, 2016 09:59 PM

Hi Nijamudeen,

Thank you for your answer. I think it meet what I needs           
but I cannot set the schedule on SetContentView, when I use "Syncfusion.SfSchedule.XForms". I have got this error "cannot convert from 'Syncfusion.SfSchedule.XForms.SfSchedule' to 'Android.Views.View'" 

can you please help me out to solve this error .
Thank in advance .
Regards
Ammar

Subburaj Pandian Veluchamy [Syncfusion]
Replied On March 25, 2016 08:30 AM

Hi Ammar,


Thanks for the update.


We have attached the sample for the requirement of getting selected cell values and appointment details can be achieved by triggering ScheduleCellTapped event in SfSchedule Xamarin Android. Please find the sample below,


Sample: ScheduleSampleProject

If the provided information does not meet your requirement, could you please provide us more information along with simple issue reproducing sample and its replication procedures? It will be helpful for us to analyze on it and provide you a possible solution.


Please let us know, if you have any queries.


Regards,

Subburaj Pandian V




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.

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.

;