Looking for RadScheduler sample/examples with EntityDataSource *AND* Multi-value resources

4 posts, 0 answers
  1. Scott
    Scott avatar
    4 posts
    Member since:
    Sep 2008

    Posted 20 Jun 2011 Link to this post

    Does anyone have/know of any examples for something similar to this: Telerik Sample For Multiple Resources

    Except, with multi-valued resources?  I'm new to entity data sources, and I'm just inheriting a project that has an existing model that works.  But the owner is asking for a new resource type to be added that has a one-to-many relationship for "department(s)".  If this was a standard 3-tier system, I would have no trouble getting this completed.

    I've got the database updated to the model I THINK by creating a link table Called "EventDepartments" (Model Layout is attached).  and I have the UI populating with the checkbox list.  But...

    1. There is an Integrity error on insert/update: "The type of the key field 'ID' is expected to be 'System.Int32', but the value provided is actually of type 'System.Object[]'."
    2. I have no idea where to go from here, as I don't know where to look for the issue since the appointment form is auto-generated/handled.



    ResourceType:
    <telerik:ResourceType KeyField="ID" Name="Departments" AllowMultipleValues="true"
            TextField="Text" ForeignKeyField="DepartmentID"
    DataSourceID="EDSDepartments" />

     
    Source:
    <asp:EntityDataSource runat="server" ID="EDSDepartments" ConnectionString="name=OlympiaEntities"
        DefaultContainerName="OlympiaEntities" EntitySetName="Resources" EnableInsert="True"
        Where="it.ResourceTypeID = 4 && Not it.ParentID Is NULL" EnableUpdate="True">
    </asp:EntityDataSource>
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 21 Jun 2011 Link to this post

    Hi Michael Klink,

    Thank you for the detailed information.

    Please note that only custom providers can provide the support to allow multi-valued resources (resources that can have multiple values assigned to a single appointment). In your case multi-valued resources will not work with EntityDataSource. The only alternative that I can find is to use CustomAttributes instead of resources and to separate the attribute values by some delimiter (e.g semicolon). Please take a look at this demo for Custom Attributes.

    Please let me know if this helps.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Spyder
    Spyder avatar
    1 posts
    Member since:
    Aug 2011

    Posted 15 Aug 2011 Link to this post

    This is very similar to the question that I have.  I am working on a project where we have built objects that I have bound the RadScheduler but now we would like to be able to include three types of Resources and would like to assignee more than one of each type.  Based on your previous response, I see that this is not possible with Entity, is that true for other object models?  Examples exist that show how to schedule resources with database binding (for instance "The Advanced ASP.NET AJAX Reschedule Customization" video http://tv.telerik.com/watch/aspnet/radscheduler/advanced-radscheduler-customization).  However this video does not show population of an intersection table (that contains the instructorID and WebinarID) that is in your example from the video, would allow the user to schedule many instructors to many scheduled webinars.  Is many to many possible at all?  If so, can you point me in the direction of an video and/or code example that demonstrates the scheduling of many resources of one type. 

    See the attached schema design.

     

    Thanks for your help.

  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 Aug 2011 Link to this post

    Hello Spyder,

    Yes, this limitation is also true for other data sources. You need to implment a provider. Please, see this help topic - http://www.telerik.com/help/aspnet-ajax/scheduler-provider-with-multi-valued-resources.html

    Kind regards,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top