New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Multiple Resource Values

  • today
April 2012
April 2012
SMTWTFS
       
1234567
891011121314
15161718192021
22232425262728
2930     
4/15/2012 - 4/21/2012
  • Day
  • Week
  • Agenda
all day
8AM
9AM
10AM
11AM
12PM
1PM
2PM
3PM
4PM
5PM
Construction documentation review.
Assigned to: Alex, Bob
Take the car to the service.
Assigned to: Alex
Show 24 hours...
  • Edit
  • Delete
  • New Appointment
  • New Recurring Appointment
  • Go to today
  • Show 24 hours...

Assigning multiple resources of the same type to an Appointment requires maintaining many-to-many relationship between resources and appointments. That is why this it is not available when binding to declarative data sources.

To use it, you need a custom provider that is capable of storing the relationships. The XML Scheduler Provider is an example for such provider. There is also a help topic on implementing a provider that supports multi-valued resources.

You can also turn off the support selectively by setting AllowMultipleValues of the ResourceType objects in the RadScheduler.ResourceTypes collection. The ResourceTypes collection is available after data binding.

An example of a provider that supports multiple resource values and stores its data in an SQL database is available here. It uses a cross-link table to store the many-to-many relationship between appointments and resource.

RadScheduler supports assigning multiple resources of the same type to an Appointment.
Try editing appointments in this example. It allows you to assign multiple persons to each Appointment.

In this Demo different resources are added with different colors in the subject of the appointment so they can be easily differentiated.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Scheduler.Examples.MultipleResourceValues.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="Stylesheet" type="text/css" href="styles.css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="demo-container no-bg">
        <telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedView="WeekView"
            SelectedDate="2012-04-16" DayStartTime="08:00:00" DayEndTime="18:00:00"
            OnDataBound="RadScheduler1_DataBound" OnAppointmentCreated="RadScheduler1_AppointmentCreated"
            OverflowBehavior="Auto">
            <AdvancedForm Modal="true"></AdvancedForm>
             <AgendaView UserSelectable="true" ResourceMarkerType="Block"/>
            <MonthView UserSelectable="false" />
            <TimelineView UserSelectable="false" />
            <AppointmentTemplate>
                <%# Eval("Subject") %>
                <br />
                <asp:Label runat="server" ID="AssignedTo" EnableViewState="false"></asp:Label>
                <br />
                <asp:Label runat="server" ID="Location" EnableViewState="false"></asp:Label>
            </AppointmentTemplate>
            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance