Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 481k

Syncfusion.EJ2 not loading URL page not found

Oct 19 2020 5:33 AM
Hi Team
 
Has any developer ever worked on this library, i have installed it and trying to use Calendar Scheduler. Its not loading the URL on the View, page is not found. This what i have at the moment, the View "The page can not be found"
  1.   routes.MapRoute(  
  2.                 name: "LocalData",  
  3.                 url: "load-data",  
  4.                 defaults: new {controller = "Schedule", action = "LocalData", id= UrlParameter.Optional}  
  5.   
  6.              );  
  7.   
  8.      //GET:eNtsaCoourseEvents.  
  9.      public partial class ScheduleController:Controller  
  10.         {  
  11.             public ActionResult LocalData()  
  12.             {  
  13.                 ViewBag.datasource = new ScheduleData().eNtsaCalendarEventsData();  
  14.                 return View();  
  15.             }  
  16.         }  
  17. @using  Syncfusion.EJ2  
  18. @using Syncfusion.EJ2.Schedule  
  19. @model eNtsaRegistrationTraining.Models.ScheduleData  
  20.   
  21. @section ControlsSection{  
  22.     <div class="control-section">  
  23.         <div class="content-wrapper">  
  24.             @Html.EJS().Schedule("schedule").Width("100%").Height("650px").EventRendered("onEventRendered").EventSettings(new ScheduleEventSettings {DataSource = ViewBag.datasource}).SelectedDate(new DateTime(2020,10,15)).Render()  
  25.         </div>  
  26.     </div>  
  27.     <!--Adding some Javascript libraries-->  
  28.     <script type="text/javascript">  
  29.         function onEventRendered(args) {  
  30.             var scheduleObk = document.getElementById('schedule').ej_instance[0];  
  31.             var categoryColor = args.data.CategoryColor;  
  32.             if (!args.element || !categoryColor) {  
  33.                 return;  
  34.             }  
  35.             if (scheduleObk.currentView === 'Agenda') {  
  36.                 (args.element.firstChild).style.borderLeftColor = categoryColor;  
  37.             } else {  
  38.                 args.element.style.categoryColor;  
  39.             }  
  40.         }  
  41.     </script>  
  42.       
  43.  }  
 

Answers (3)