How to create Scheduler using asp.net mvc ?

Hi Team

I am following a documentation well somehow i am confusing when using Model, is there an example to the Model side, i have followed this link below. I want to use local data to create event schedulor but the model side i cant seem to see an example, i need an example.

https://ej2.syncfusion.com/aspnetmvc/Schedule/LocalData#/material

8 Replies 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team October 15, 2020 10:32 AM UTC

Hi Gcobani, 

Greetings from Syncfusion support. 

We have prepared a simple MVC local data sample for your reference which can be downloaded from the following link. 

 
[ScheduleData.cs] 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
 
namespace ej2_mvc_web_schedule_app.Models 
{ 
    public class ScheduleData 
    { 
        public List<ZooEventData> GetZooEventData() 
        { 
            List<ZooEventData> zooEventData = new List<ZooEventData>(); 
            zooEventData.Add(new ZooEventData 
            { 
                Id = 1, 
                Subject = "Story Time for Kids", 
                StartTime = new DateTime(2018, 2, 11, 10, 0, 0), 
                EndTime = new DateTime(2018, 2, 11, 11, 30, 0), 
                CategoryColor = "#1aaa55" 
            }); 
            return zooEventData; 
        } 
 
        public class ZooEventData 
        { 
            public int Id { get; set; } 
            public string Subject { get; set; } 
            public DateTime StartTime { get; set; } 
            public DateTime EndTime { get; set; } 
            public string CategoryColor { get; set; } 
        } 
 
 
    } 
} 
 
Kindly try the above sample and get back to us if you need any further assistance. 

Regards, 
Ravikumar Venkatesan 


Marked as answer

GC Gcobani October 19, 2020 09:28 AM UTC

Thanks so much mate, it make a sense now and happy you showed me this example. 


NR Nevitha Ravi Syncfusion Team October 19, 2020 09:37 AM UTC

Hi Gcobani, 

You are most welcome 😊 . We are always happy to assist you, please get back to us if you need any further assistance. 

Regards, 
Nevitha 



GC Gcobani October 19, 2020 09:51 AM UTC

Hi Team

If perhaps you have file or library config issue on your VS? I did run some Nuget command for the latest version, now my ej2.dt.js are not loading. please below;




GC Gcobani October 19, 2020 10:23 AM UTC

Hi Team

I end up finding the solution below, i was not having tconfig.json file under e2j.dt. 

https://www.syncfusion.com/forums/142084/creating-new-project-with-template-doesnt-work


NR Nevitha Ravi Syncfusion Team October 20, 2020 06:33 AM UTC

Hi Gcobani, 

Thanks for your update. 

We are happy that your reported problem has been resolved at your end. Kindly get back to us if you need any further assistance. 

Regards, 
Nevitha 



GC Gcobani replied to Nevitha Ravi October 20, 2020 09:15 AM UTC

Hi Gcobani, 

Thanks for your update. 

We are happy that your reported problem has been resolved at your end. Kindly get back to us if you need any further assistance. 

Regards, 
Nevitha 


Hi Team, would can help with the View in Asp.net mvc 5, my schedule does not want to show. what am i missing? Do i need to config something on web.config?


RV Ravikumar Venkatesan Syncfusion Team October 21, 2020 12:57 PM UTC

Hi Gcobani, 

Thanks for the update. 

We have validated your reported query at our end. To use the ej2 schedule in your project you need to add the below-highlighted code in your project Web.config file location in your project directory “~/Views/Web.config”. We have prepared a sample for your reference and it can be available below. 

[Web.config] 
<configuration> 
  <system.web.webPages.razor> 
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    <pages pageBaseType="System.Web.Mvc.WebViewPage"> 
      <namespaces> 
        ... 
        ... 
       <add namespace="Syncfusion.EJ2"/> 
      </namespaces> 
    </pages> 
  </system.web.webPages.razor> 
 
  ... 
  ... 
 
  <system.web> 
    <compilation> 
      <assemblies> 
        ... 
        ... 
      <add assembly="Syncfusion.EJ2, Culture=neutral" /> 
      </assemblies> 
    </compilation> 
  </system.web> 
</configuration> 


Kindly try the above sample, if you face any problem kindly share the issue replicating sample or issue details. 

Regards, 
Ravikumar Venkatesan 


Loader.
Up arrow icon