DataSource & Resources differences clarification?

4 posts, 0 answers
  1. Alex
    Alex avatar
    4 posts
    Member since:
    May 2016

    Posted 18 May Link to this post

    Hi, just got view model displayed on calendar, now trying to add EventTemplate & display some fields from view model, but got undefined error, so i'm adding Resources. i kinda understand this Resources is the data for event, but what are the exact differences between DataSource and Resources?

    Since DataSource takes view model and the fields i want to show are all in view model. is there an easy way to populate EventTemplate?

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    281 posts

    Posted 20 May Link to this post

    Hello Alex,

    I am not quite sure what do you mean by "view model". There are several demos that could help you understand better the different sources of data for RadScheduler.

    Generally, the main source of data for a RadScheduler is the Appointments information. It could be passed to the RadScheduler by using Generic list, XML file and XML provider, Database provider, Entity data source, Web service, SQL data source.

    Resources, on the other hand, provide additional information about appointments. For example, in a RadScheduler there could be several users that have appointments, or several rooms, where appointments are held. User is one resource type, while Room is another one. In the Appointments data, there is information about which are the user and the room for each appointment. At the same time, you could retrieve additional information for each user / room from a separate data source. When SQL data source is being used, in most cases these are three separate tables - an Appointments table, a Users table and a Rooms table which are related to each other.

    I hope that the above helps you. If you have any further questions, please do not hesitate to contact us.

    Regards,
    Veselin Tsvetanov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alex
    Alex avatar
    1 posts
    Member since:
    May 2016

    Posted 22 May in reply to Veselin Tsvetanov Link to this post

    Hi Veselin,

     

    Thank you very much for the helpful reply. i was following http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/scheduler/ajax-editing

    so i got task returned as JSON, 

    two scenarios:

    1, if i create Task view model and put fields like Assignee, Assigner into it. and want Assignee and Assigner to be displayed on a event on calendar. So Assignee, Assigner will be returned as part of JSON. How do i access them in EventTemplate? i tried but they were undefined. i noticed there is another example:

    http://demos.telerik.com/aspnet-mvc/scheduler/templates

    This example returns a model to the view so EventTemplate can access to fields in that model, but what to do when a JSON is returned.

    2, i just want to confirm the usage of Resources - should i NOT put Assignee, Assigner into view model, but got Task data from database in Resources' datasource call? Then display Assigner, Assignee in EventTemplate? Thanks.

     

  5. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    281 posts

    Posted 24 May Link to this post

    Hello Alex,

    As your question concerns the UI for ASP.NET MVC Scheduler and not the RadScheduler control from the ASP.NET AJAX suite, I would suggest you to post your question in the MVC forum. There is the place where you will find the right answers of your questions.

    Regards,
    Veselin Tsvetanov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top