Hi
I am trying to bind my existing appointments from database to the radschedular. But it is showing only the current time's appointment which is not in the database. Eg: If I execute my code at 4.15 pm then it is creating an appointment from 4.15 pm to 4.15pm in radschedular. This appointment is not there in the database.
I have used the following code :
SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource();
AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo();
appointmentMappingInfo.Start = "FromTime";
appointmentMappingInfo.End = "ToTime";
appointmentMappingInfo.Summary = "Subject";
appointmentMappingInfo.
UniqueId = "ReservationID";
dataSource.EventProvider.Mapping = appointmentMappingInfo;
// assign the generic List of MyAppointment as the EventProvider data source
dataSource.EventProvider.DataSource = reservationBO.getActiveReservationsByRoom(this.RoomId).ToList();
this.radScheduler1.DataSource = dataSource;
reservationBO.getActiveReservationsByRoom(this.RoomId).ToList(); - This is the list which I am pulling out from the database.
If I am using
this.radScheduler1.DataSource = reservationBO.getActiveReservationsByRoom(this.RoomId).ToList();
then it is showing an error message : "
Cannot implicitly convert type 'System.Collections.Generic.List<RMAS.Data.Reservation>' to Telerik.WinControls.UI.SchedulerDataSource' "
how can I fix this. Need your help