Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Team

I am using this extension on my web application, the problem on my View is showing page cannot be found. URL is localhost:portnumber/Schedule/LoadData

What I have tried:

routes.MapRoute(  
                name: "LocalData",  
                url: "load-data",  
                defaults: new {controller = "Schedule", action = "LocalData", id= UrlParameter.Optional}  
  
             );  
  
     //GET:eNtsaCoourseEvents.  
     public partial class ScheduleController:Controller  
        {  
            public ActionResult LocalData()  
            {  
                ViewBag.datasource = new ScheduleData().eNtsaCalendarEventsData();  
                return View();  
            }  
        }  
@using  Syncfusion.EJ2  
@using Syncfusion.EJ2.Schedule  
@model eNtsaRegistrationTraining.Models.ScheduleData  
  
@section ControlsSection{  
    <div class="control-section">  
        <div class="content-wrapper">  
            @Html.EJS().Schedule("schedule").Width("100%").Height("650px").EventRendered("onEventRendered").EventSettings(new ScheduleEventSettings {DataSource = ViewBag.datasource}).SelectedDate(new DateTime(2020,10,15)).Render()  
        </div>  
    </div>  
    <!--Adding some Javascript libraries-->  
    <script type="text/javascript">  
        function onEventRendered(args) {  
            var scheduleObk = document.getElementById('schedule').ej_instance[0];  
            var categoryColor = args.data.CategoryColor;  
            if (!args.element || !categoryColor) {  
                return;  
            }  
            if (scheduleObk.currentView === 'Agenda') {  
                (args.element.firstChild).style.borderLeftColor = categoryColor;  
            } else {  
                args.element.style.categoryColor;  
            }  
        }  
    </script>  
      
 }  
Posted
Comments
ZurdoDev 19-Oct-20 9:50am    
Is this a typo? Your url is LoadData but your action is LocalData. If it's not a typo, that's your problem.
gcogco10 19-Oct-20 9:52am    
No the problem, this extension does not seem to work. WHat i did after the thread i inserted. Had created a seperate controller:ScheduleController and call of my View. The Calendar was not showing and no errors when inspected. I dont know what could be an issue for this extension if i am implementing on VS using asp.net mvc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900