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> }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)