I'm using the scheduler to organize appointments on a bunch of rooms; sometimes it happens that the appointment is not for a defined room but for any room available at that moment, i would like to have the appointment item to spread across the columns instead of having single items per every column.
I added a screen shot of what it is and what I'd like to have (manipulated by graphic tools)
Thanks in advance
16 Answers, 1 is accepted
Unfortunately this is not possible. I've set the GroupBy property of the RadScheduler to "User" in the demo about "Multiple Resource Values" and here's the result:
There is no easy workaroud to make the two appointments look like one.
Greetings,
Veronica Milcheva
the Telerik team
You can refer to the Resource Type Collection Editor help topic where is described how to generate easily your resources from the designer. I am also attaching a sample project that implements Multiple Resources in a RadScheduler bound to a SQL DataSource.
Hope the will be helpful.
Plamen Zdravkov
the Telerik team
To give you more info on my situation. The way our system is designed our web forms do not have direct access to the database but rather consume data provided by a middle tier. So the SQL data source won't work. I was following some of the examples and creating a dataprovider that providesa list of Telerik Appoinment objects and binding the RadScheduler to this list. The Appointment object does not have a property for resources but rather a collection of resources. I'm not sure how to set up the resource type foreignkeyfield to map to the resource collection. In the end I need the RadScheduler to group by the resource.
[InvalidCastException: Object must implement IConvertible.]
Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e) +39
System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +80
Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Insert(RadScheduler owner, Appointment appointmentToInsert) +184
Telerik.Web.UI.SchedulerProviderBase.Insert(ISchedulerInfo schedulerInfo, Appointment appointmentToInsert) +62
Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointment) +100
Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointment(ISchedulerInfo schedulerInfo, Appointment appointment) +40
Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +282
Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +483
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
It seems that I misunderstood you and provided not the right project in the previous post. Please excuse me for that mistake. Multi-valued resources are supported only with a provider so this sample should be work properly for your case.
you can also review the help topic that deeply explain this functionality.
Hope this will help you.
Plamen Zdravkov
the Telerik team
I have gotten past this hurdle. I had not been fully using the provider model. My custom provider based on SchedulerProviderBase originally had only the appointment info in it. I was addiding the resources directly to the radScheduler. Once I put the resources in my custom provider and matched my appointment's resources to the list of resources it all worked.
Thanks for your help.
I am attaching the same web page in VB.
Hope this will be helpful.
Plamen Zdravkov
the Telerik team
See the attachment. Thanks
Thanks
I have tested the "MultipleResourcesWith-DaBinVB.zip" project once again and it worked properly at my side. Here is a video of my test. Would you please explain what should be changed in it in order to observe the issue you are experiencing because it is not quite clear?
Plamen
the Telerik team
Actually I just download the VB version and do nothing change on it, however once I open the scheduerDBProvider class, it already shown me the error as show in the picture below, of course compiliation will give me the similar error.
http://www.telerik.com/ClientsFiles/395600_SchedulerDBProvider.gif
Beside this, i also saw some error in Insert, Delete, Update and GetAppointment function. I attached another screen shot here. Is this caused by this version of Telerik? I am using Telerik.Web.UI.dll, version 2012.2.713.20
Your help is very much appreciated, as I totally stuck to support multiple appointments. Thanks
I have inspected the Web Site that you pointed once again but unfortunately could not observe the described issue. I created a solution based on it and it worked properly as well. Here is a video of my test.
If you still observe the unusual behavior please explain what should we do in order to observe the same at our side so we can be able to research it and suggest a solution.
Plamen
the Telerik team
Hi,
Can you please help me on resource grouping, Im unable to bind the appointments based on grouping.
Im able to get the header but unable to bind the appointments.
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" GroupBy="ServiceType" GroupingDirection="Horizontal" Skin="Web20"
Height="500px"
AppointmentStyleMode="Default" DataKeyField="ID"
FirstDayOfWeek="Monday" LastDayOfWeek="Friday" DataSubjectField="Subject" DataSourceID="CalendarEntries"
DataStartField="FromDate" DataEndField="ToDate"
SelectedView="DayView" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"
OverflowBehavior="Auto">
<AdvancedForm Modal="true"></AdvancedForm>
<MonthView UserSelectable="true"></MonthView>
<TimelineView />
<ResourceHeaderTemplate>
<asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
<asp:Image ID="SpeakerImage" runat="server" AlternateText='<%# Eval("Text") %>'></asp:Image>
</asp:Panel>
</ResourceHeaderTemplate>
<AppointmentTemplate>
<%#Eval("ForUser") %> - <%#Eval("Subject") %> - <%#Eval("Reason") %>
<br />
<%#Eval("ServiceStatus") %>
<br />
<%#Eval("TeamEventName") %>
</AppointmentTemplate>
<ResourceTypes>
<telerik:ResourceType KeyField="ID" Name="Service" TextField="ServiceType" ForeignKeyField="ID"
DataSourceID="ServiceDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="ID" Name="Team" TextField="TeamName" ForeignKeyField="ID"
DataSourceID="TeamDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="ID" Name="ManagerName" TextField="ManagerName" ForeignKeyField="ID"
DataSourceID="ManagerDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="ID" Name="TeamLeadName" TextField="TeamLeadName" ForeignKeyField="ID"
DataSourceID="TLDataSource"></telerik:ResourceType>
</ResourceTypes>
<ResourceStyles>
<telerik:ResourceStyleMapping Type="ServiceType" Text="PTO" Key="1" BackColor="#eb901b"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="ServiceType" Text="WFH" Key="2" BackColor="#8fd21b"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="ServiceType" Text="OOO" Key="3" BackColor="#278ce9"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="ServiceType" Text="TE" Key="4" BackColor="#f14db2"></telerik:ResourceStyleMapping>
</ResourceStyles>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
You can refer to this help topic where is described what the DataSource Structure should be and this one how to do a declarative binding.
Regards,
Plamen
Telerik by Progress