What are the required and optional fields for the e-schedule-eventsettings dataSource list objects?

I am using the EJ2 Schedule control and I want to populate the Agenda view with a List of objects. I can't find in the documentation any description of what each object in the datasource list should look like. What properties should each object in the List contain? In what order? What are the required object properties (if any) and are there optional properties that can be used? 

In general, where can I find documentation on all EJ2 tags and their attributes?

3 Replies

VS Velmurugan S Syncfusion Team June 19, 2018 02:20 PM UTC

Hi Jim,

Thanks for Contacting Syncfusion support. 

We are currently drafting complete UG documentation on how to use the scheduler in combination with various other features and will publish it soon in this Volume-2 2018 release. Until then, we kindly request you to have a look at our below UG links to know about our Schedule control properties (API) and mandatory fields details and ASP.NET Core getting started. 


Also, we have prepared the JS2 Schedule sample with List of objects and it can be downloaded from the following location. 


In the above sample, displaying the agenda view in the initial load with the list of appointments data and then you can navigate to other views like “Day, Week, WorkWeek, Month”. Please refer to the following class structure to create the appointments data and the list of example appointments data. 

Class Structure: 

   public class AppointmentData 
    { 
        public int Id { get; set; } 
        public string Subject { get; set; } 
        public DateTime StartTime { get; set; } 
        public DateTime EndTime { get; set; } 
        public string StartTimezone { get; set; } 
        public string EndTimezone { get; set; } 
        public bool IsAllDay { get; set; } 
        public string Location { get; set; } 
        public string Description { get; set; } 
        public string RecurrenceID { get; set; } 
        public string RecurrenceRule { get; set; } 
        public string RecurrenceException { get; set; } 
    } 
 
Example Data Objects: 

List<AppointmentData> appData = new List<AppointmentData>(); 
            appData.Add(new AppointmentData 
            { 
                Id = 1, 
                Subject = "Explosion of Betelgeuse Star", 
                StartTime = new DateTime(2018, 2, 11, 9, 30, 0), 
                EndTime = new DateTime(2018, 2, 11, 11, 0, 0) 
            }); 
            appData.Add(new AppointmentData 
            { 
                Id = 2, 
                Subject = "Thule Air Crash Report", 
                StartTime = new DateTime(2018, 2, 12, 12, 0, 0), 
                EndTime = new DateTime(2018, 2, 12, 14, 0, 0), 
  IsAllDay = true 
            }); 
            ----------------------------- 
            ----------------------------- 
            ----------------------------- 
            ----------------------------- 
            ----------------------------- 
           appData.Add(new AppointmentData 
            { 
                Id = 20, 
                Subject = "Meeting with Core team", 
                Location = "Office", 
                StartTime = new DateTime(2018, 2, 16, 12, 0, 0), 
                EndTime = new DateTime(2018, 2, 16, 14, 0, 0), 
                RecurrenceRule = "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR" 
            }); 
 

Please refer to the following mandatory field details to display the appointments properly and our online sample links. 

  1. Normal appointments        :- Id, StartTime, EndTime
  2. AllDay appointments          :- Id, StartTime, EndTime, IsAllDay
  3. Recurrence appointments :- Id, StartTime, EndTime, RecurrenceID, RecurrenceRule, RecurrenceException
 
Sample Links:  
 
Kindly try with the above sample and code example details and let us know if you need any further assistance on this. 

Regards,
Velmurugan



JI JimN June 29, 2018 03:39 PM UTC

I appreciate the help, but I also need to ask why you don't provide samples using ASP.NET Core Razor pages? I have been tasked with creating a web site in ASP.NET Core with as little JavaScript as possible. Your answer does help me with the different options available. I thank you for that. Please see my more recent forum entry for further questions that I have. (I need to add events, or appointments, to the schedule from the class Model code in C# using Razor on the layout page. No JavaScript, or very little, is allowed.

Thank you


VS Velmurugan S Syncfusion Team July 3, 2018 01:24 PM UTC

Hi Jim, 
  
We regret for the inconvenience caused, and now we have considered your requirement and prepared the sample using ASP.Core Razor pages which can be downloaded from the following location. 
 
 
In the above sample we have used the same data which is present in our previous shared sample, but loaded to the Schedule control from the code behind page (Index.cshtml.cs) instead of controller page. Please refer to the code example used in the above sample to load the data from code behind page. 
 
Index.cshtml: 
 
<ejs-schedule id="schedule" height="550px" currentView="Agenda" selectedDate="new DateTime(2018, 2, 15)"> 
    </e-schedule-eventsettings> 
</ejs-schedule> 
 
Index.cshtml.cs: 
 
public System.Collections.Generic.List<AppointmentData> Datasource { get; set; } 
public void OnGet() 
{ 
   Datasource = new ScheduleData().GetScheduleData().ToList(); 
} 
 
 
Kindly check with the above sample and let us know if you need any further assistance on this. Also, we are analyzing your all the requirements posted in your recent forums and working on it with high priority and will update the details in the respective forum entry. 
  
Regards,
Velmurugan


Loader.
Up arrow icon