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. Image for the cookie policy date

How to get the selected values

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



3 Replies

NM Nijamudeen Mohamed Sulaiman Syncfusion Team March 24, 2016 05:08 AM UTC

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.



AA Ammar Al-Suhairy March 25, 2016 01:59 AM UTC

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


SP Subburaj Pandian Veluchamy Syncfusion Team March 25, 2016 12:30 PM UTC

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




Loader.
Up arrow icon