Data binding with more than one source.

5 posts, 0 answers
  1. Oliver
    Oliver avatar
    17 posts
    Member since:
    Aug 2008

    Posted 17 Oct 2012 Link to this post


    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!
  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 19 Oct 2012 Link to this post


    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.

    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.
  3. Christopher
    Christopher avatar
    8 posts
    Member since:
    Nov 2016

    Posted 23 Jan 2017 Link to this post

    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?
  4. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3566 posts

    Posted 24 Jan 2017 Link to this post

    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:

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

    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.
  5. Christopher
    Christopher avatar
    8 posts
    Member since:
    Nov 2016

    Posted 24 Jan 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thank you, Dess.  We decided to go with just using 1 table.
Back to Top