This is a migrated thread and some comments may be shown as answers.

Data binding with more than one source.

4 Answers 92 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 17 Oct 2012, 06:26 PM
Hello!

I have a database with two separate tables for different kinds of appointments; one for calls and tasks, and another for actual meetings.

I want these all to be shown in the same RadScheduler, but as far as I can tell, it only takes one data source with one set of AppointmentMappingInfo (the two tables have some column names that differ).  How can I bind data from both tables into the same RadScheduler?

Thank you!

4 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 19 Oct 2012, 03:24 PM
Hello,

Thank you for contacting us.

RadScheduler does not support such binding scenario. To be able to load the data from the two tables in RadScheduler, you would need to create an additional layer which collects the data from both tables and presents it as a single table. This can be achieved by creating a view in your database which unites the two tables into one table with consistent fields (i.e. select the columns with different names that contain the same type of data as a single column). An alternative approach is to create programmatically a DataTable that contains the merged result of the two tables. Both cases will require some additional effort to implement the insert/update/delete operations which would not be needed if the data was in a single table.

I hope you find this useful. Do not hesitate to write back in case you have any further questions.

Greetings,
Ivan Todorov
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
0
Christopher
Top achievements
Rank 1
answered on 23 Jan 2017, 08:09 PM
I have a similar situation.  I have 2 tables that I want to display information from.  They have different field names, but I can probably merge them into a datatable.  I want to be able to add, update and delete from one table but not the other.  I also want the appointment background color to be different depending on which table the appointment is being displayed.  I don't want to change the structure of my database tables to do this.  Is there any help for this kind of situation?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Jan 2017, 10:47 AM
Hello Christopher,

Thank you for writing.  

In order to bind RadScheduler, it is necessary to use SchedulerBindingDataSource where the EventProvider and ResourceProvider properties are set to an AppointmentMappingInfo and a ResourceMappingInfo. While the SchedulerBindingDataSource.EventProvider.DataSource property accepts the collection containing the appointments, the ResourceProvider.DataSource property assigns the relevant resources. It is not possible to use two collections for the appointments for example. It is necessary to create a collection and merge the data in a single collection. However, in this case, it would be necessary to update the database manually

The following help article demonstrates how to bind RadScheduler: http://docs.telerik.com/devtools/winforms/scheduler/data-binding/data-binding-walkthrough

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Christopher
Top achievements
Rank 1
answered on 24 Jan 2017, 07:28 PM
Thank you, Dess.  We decided to go with just using 1 table.
Tags
Scheduler and Reminder
Asked by
Oliver
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Christopher
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or