4 posts, 1 answers
  1. Mark
    Mark avatar
    24 posts
    Member since:
    Jan 2011

    Posted 11 May 2011 Link to this post

    Good day,

    I am trying my darnedest to get this working without an entity model. My database structure is nothing even close or usuable for the scheduleview so I am attempting to manually create the objects.

    In the .Web project I have manually created a DomainService:

    public class MyDomainService : DomainService
        private Random random = new Random();
        public List<Appointment> GetVisits(DateTime aStartDate)
            List<Appointment> result = new List<Appointment>();
            DateTime startDate = DateTime.Now.Date;
            for (int i = 0; i < 10; i++)
                int length = 0;
                for (int currentTime = 0; currentTime < 24 * 60; currentTime += length)
                    length = this.random.Next(30, 180);
                    if (length % 5 == 0)
                    if ((24 * 60 - currentTime + length) < 60
                         || (24 * 60 - currentTime - length) < 0)
                    Appointment appointment = new Appointment();
                    appointment.Subject = string.Format("App {0}.{1}", i + 1, length);
                    appointment.Start = startDate.AddMinutes(currentTime);
                    appointment.End = startDate.AddMinutes(currentTime + length);
                startDate = startDate.AddDays(1);
            return result;

    To get access to "Appointments" I need to add Telerik.Windows.Controls.ScheduleView. That assembly doesn't appear to be readily available in the .Net references (as it is for the non .web project) so I have to browse or use recent to reference the assembly. Then I get warnings for other assemblies saying that I am missing System.Windows and System.Windows.Data. Do I need to address these warning?

    Then when I add "using Telerik.Windows.Controls.ScheduleView;" to my DomainService I get the folllowing error:

    Error   2   The type 'Telerik.Windows.Controls.ViewModelBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.Windows.Controls, Version=2011.1.419.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'.  

    So by brute force  I add a reference to Telerik.Windows.Controls.dll.

    After all that, when I can finally build the .web project. When I build the silverlight project I get the following error:

    Error   1   Entity 'Telerik.Windows.Controls.ScheduleView.Appointment' has a property 'TimeZone' with an unsupported type.  

    How do I fix this error?

    Was all the work necessary to access appointments in the DomainService or is there a better way?

    Microsoft Visual Studio 2010
    Version 10.0.30319.1 RTMRel
    Microsoft .NET Framework
    Version 4.0.30319 RTMRel

    Installed Version: Professional

    Microsoft Visual C# 2010   01018-587-3062631-70500
    Microsoft Visual C# 2010

    Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB982218)   KB982218
    This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.

    Telerik Silverlight VSExtensions   2011.01.414.0
    Telerik RadControls for Silverlight VSExtensions Package


  2. Answer
    George avatar
    1332 posts

    Posted 13 May 2011 Link to this post

    Hi Mark,

    Thank you for contacting us.

    We are aware of this issue. The problem is that the TimeZoneInfo class cannot be deserialized in the Silverlight project. For example, if you try to implement a method that returns a TimeZoneInfo object, an error will be thrown when the call is completed in the Silverlight project. Unfortunately, we have a property IAppointment.TimeZone of type TimeZoneInfo and this causes the problem.
    Also, the SerializableAttribute is not set for the AppointmentBase class. This could causes more troubles when you use it for return type of a method in the WCF Service. The reason for missing such attribute ii that the RadScheduleView assemblies are for Silverlight and their purpose is to be used only in Silverlight projects.

    We don't support passing an appointments through the WCF Service. I would suggest you to pass another object that doesn't inherit the AppointmentBase in the WCF Service and to generate Appointments in the Silverlight project, according to this object

    • create a database appointment in the WCF Service (this appointment should not inherit the AppointmentBase or Appointment class)
    • pass this database appointment to the silverlight application
    • consume the service and create the Appointment according to the loaded database appointment
    • passing the appointment object to the ScheduleView control.

    For more information how to achieve this scenario, please refer to the following link, where everything is explained in details - This article is for the RadScheduler control, but it could point you to the right direction.

    I hope this helps. Please do not hesitate to contact us if you require any further information.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Leo
    Leo avatar
    49 posts
    Member since:
    Oct 2010

    Posted 10 May 2012 Link to this post


    I don't seem to see the Categories/TimeMarkers class when creating a helper class. Am I missing something?
  5. George
    George avatar
    1332 posts

    Posted 16 May 2012 Link to this post

    Hello Leo,

    Can you please specify which helper class is missing the Categories/TimeMarkers? 

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top