- Home
- Forum
- Xamarin.Android
- How to get the selected values
How to get the selected values
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!
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.
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 .
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
- 3 Replies
- 3 Participants
-
AA Ammar Al-Suhairy
- Mar 23, 2016 05:50 PM UTC
- Mar 25, 2016 12:30 PM UTC