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
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.
dataSource.EventProvider.
// assign the generic List of MyAppointment as the EventProvider data source
dataSource.EventProvider.
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.radSchedul
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
7 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 05 Dec 2010, 11:12 PM
Hello,
You will need to use a SchedulerBindingSource for this. Please take a look at the following links which will help.
Databinding Radscheduler Introduction (Documentation)
Databinding RadScheduler for WinForms (Blog)
Codeless Databinding for RadScheduler (Telerik TV)
hope that helps
Richard
You will need to use a SchedulerBindingSource for this. Please take a look at the following links which will help.
Databinding Radscheduler Introduction (Documentation)
Databinding RadScheduler for WinForms (Blog)
Codeless Databinding for RadScheduler (Telerik TV)
hope that helps
Richard
0
Tanvi
Top achievements
Rank 1
answered on 05 Dec 2010, 11:57 PM
Hi
Thanks it worked. I am able to show all my appointments that are in my database on the radscheduler. However, I want to show the appointments related to a room . Eg: User would be selecting a room and i want to show appointments related only to that room on the radschedular.
This function :
reservationBO.getActiveReservationsByRoom(this.RoomId).ToList()
is retreiving the reservations related to a room. Do I have to assign datasource to the above function.
Please help.
Thanks it worked. I am able to show all my appointments that are in my database on the radscheduler. However, I want to show the appointments related to a room . Eg: User would be selecting a room and i want to show appointments related only to that room on the radschedular.
This function :
reservationBO.getActiveReservationsByRoom(this.RoomId).ToList()
is retreiving the reservations related to a room. Do I have to assign datasource to the above function.
Please help.
0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 10:00 AM
Hi Tanvi,
Frm what I see of your system, yes. You should assign a SchedlerBindingSource to that so you can bind your room based data to the scheduler.
Hope that helps. Please remember to mark answers in the forum so others can find solutions too.
All the best
Richard
Frm what I see of your system, yes. You should assign a SchedlerBindingSource to that so you can bind your room based data to the scheduler.
Hope that helps. Please remember to mark answers in the forum so others can find solutions too.
All the best
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 07 Dec 2010, 10:29 AM
Hello,
Did this help? If so, please mark as answer so others can find the solution too.
Thanks
Richard
Did this help? If so, please mark as answer so others can find the solution too.
Thanks
Richard
0
Hello Tanvi,
Thank you for writing.
If you want to see only appointments that are related to a ceratin room, you should use the rooms as resources and use the scheduler in grouping mode. In this case you will see the appointments separated in groups by rooms. All available documentation about grouping you can find here. In addition, you can review the available examples that are provided with the installation.
If you have other questions, feel free to write back.
Regards,
Dobry Zranchev
the Telerik team
Thank you for writing.
If you want to see only appointments that are related to a ceratin room, you should use the rooms as resources and use the scheduler in grouping mode. In this case you will see the appointments separated in groups by rooms. All available documentation about grouping you can find here. In addition, you can review the available examples that are provided with the installation.
If you have other questions, feel free to write back.
Regards,
Dobry Zranchev
the Telerik team
0
Tanvi
Top achievements
Rank 1
answered on 13 Dec 2010, 11:40 PM
Please check the attached error.jpeg
I am getting this error for the event written below when I am binding the radscheduler with the list of roomid's
private void reservationsBin
{
}
How should i convert 'Systems.Collections.Generic.IList< > to Telerik.wincontrol.UI.SchedulerDataSource'
Would this method as in " reservationsBin
Please reply
0
Hi Tanvi,
Thank you for writing back.
We do not support Current in RadScheduler data binding. You can vote for this task here. When this item collect enough votes, we will add it to our TO DO list.
In case that you have further questions, feel free to contact us.
All the best,
Dobry Zranchev
the Telerik team
Thank you for writing back.
We do not support Current in RadScheduler data binding. You can vote for this task here. When this item collect enough votes, we will add it to our TO DO list.
In case that you have further questions, feel free to contact us.
All the best,
Dobry Zranchev
the Telerik team
Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.