This is a migrated thread and some comments may be shown as answers.

[Solved] Scheduler Crash with ShowResourceHeaders="false"

1 Answer 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
SolutionStream
Top achievements
Rank 1
SolutionStream asked on 01 Dec 2009, 06:10 PM
We are getting a crash in the scheduler that is webService bound whenever we have it set to weekview, with the groupBy property set and the showResourceHeaders set to false.

I will try to include the source files that should allow you to duplicate this issue, I am using version 2009.3.1103.

.aspx
<script runat="server"
protected void RadScheduler1_ResourcesPopulating(object sender, ResourcesPopulatingEventArgs e) 
    { 
        // Clear any previous resources in the scheduler 
        RadScheduler1.Resources.Clear(); 
 
        var consultants = new List<RssSchedulerConsultant> 
                              { 
                                  new RssSchedulerConsultant 
                                      {Name = "test1"Id = 1
                              }; 
 
        // Create our new sub-classes schedulerInfo class 
        var info = new RssSchedulerInfo 
                                     { 
                                         ViewStart = e.SchedulerInfo.ViewStart, 
                                         ViewEnd = e.SchedulerInfo.ViewEnd, 
                                         ViewableConsultants = consultants
                                         Consultant = null 
                                     }; 
 
        // Assign it to the eventArgs 
        e.SchedulerInfo = info
    } 
</script> 
 
  <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="100%"  
    WeekView-GroupBy="Consultant" SelectedView="WeekView"  
    OnResourcesPopulating="RadScheduler1_ResourcesPopulating"  
    ShowResourceHeaders="false">  
    <WebServiceSettings Path="~/WebServices/ConsultantDayViewScheduler.asmx" ResourcePopulationMode="ServerSide" />  
  </telerik:RadScheduler>  

RssSchedulerInfo.cs
using System.Collections.Generic; 
using Telerik.Web.UI; 
using System; 
 
namespace Sonic.Rrs.MvcWeb.WebServices.Models 
    public class RssSchedulerInfo : SchedulerInfo 
    { 
        public IList<RssSchedulerConsultant> ViewableConsultants { getset; } 
 
        public RssSchedulerConsultant Consultant { getset; } 
    } 
 
    public class RssClinic 
    { 
        public int Id { getset; } 
        public string Name { getset; } 
        public DayOfWeek StartDay { getset; } 
        public DayOfWeek EndDay { getset; } 
    } 
 
    public class RssSchedulerConsultant 
    { 
        public string Name { getset; } 
        public long Id { getset; } 
        public RssClinic Clinic { getset; } 
    } 

WebService
[WebMethod(EnableSession = true)] 
        public IEnumerable<ResourceData> GetResources(RssSchedulerInfo schedulerInfo) 
        { 
            var resources = new List<ResourceData>(); 
            foreach (RssSchedulerConsultant consultant in schedulerInfo.ViewableConsultants) 
            { 
                var resourceItem = new ResourceData 
                                       { 
                                           Available = true
                                           Key = consultant.Id.ToString(), 
                                           Text = consultant.Name, 
                                           Type = "Consultant" 
                                       }; 
                resources.Add(resourceItem); 
            } 
 
            return resources; 
        } 

Any ideas?

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 07 Dec 2009, 11:21 AM
Hi,

Thank you for the detailed bug report. We were able to reproduce the issue and to fix it in time for the Service Pack release that is tentatively planned for tomorrow.

As a token of our gratitude for your involvement, your Telerik points have been updated.

Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
SolutionStream
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or