We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to render Schedule through partial view in unobtrusive mode

The following steps depicts the way to render Scheduler through partial view in unobtrusive mode.

Step1: Create the default Schedule sample in unobtrusive mode by referring the below link.



Step2: In the index page, render a button control and define its corresponding click function as shown below. Within the click function, make an ajax call to the action in a Home controller namely “Schedule”.

<button class="schedulebutton">Click to render Schedule</button>


<div id="PartialViewSchedule"></div>


<script type="text/javascript">

  $(function () {

    $(".schedulebutton").click(function (e) { //function will be called when the button is clicked


            url: "/Home/Schedule",

            type: 'POST',

            success: function (data) {

                if (!ej.isNullOrUndefined($("#Schedule1").ejSchedule("instance")))


                var d = $("#PartialViewSchedule");









Step3: Define the Home controller function Schedule which assigns the dataSource of Scheduler to ViewBag as well as returns the partial view as shown below.

public ActionResult Schedule()


            List<ScheduleData> Appoint = new List<ScheduleData>();

            Appoint.Add(new ScheduleData { Id = 1, Subject = "Meeting", StartTime = new DateTime(2017, 04, 20, 10, 00, 00), EndTime = new DateTime(2017, 04, 20, 11, 00, 00), Description = "Just a test...", IsAllDay = false, Recurrence = false, RecurrenceRule = "" });

            ViewBag.dataSource = Appoint;

            return PartialView("_schedule");}

public class ScheduleData


            public int Id { get; set; }

            public string Subject { get; set; }

            public string Description { get; set; }

            public DateTime StartTime { get; set; }

            public DateTime EndTime { get; set; }

            public bool IsAllDay { get; set; }

            public bool Recurrence { get; set; }

            public string RecurrenceRule { get; set; }



Step4: Define the partial view index page _schedule (will be under Shared folder) as shown below.




        .CurrentDate(new DateTime(2017, 4, 20))

        .AppointmentSettings(fields => fields.Datasource(ViewBag.dataSource)










Step5: Run the sample and click the button, Schedule will be rendered through partial view as shown below.

Figure1: Home page with button


Figure2: Schedule after clicking the button


Partial View in Unobtrusive mode:


Partial View without Unobtrusive mode:


Article ID: Published Date: Last Revised Date: Platform: Control:
7816 06/30/2017 06/30/2017 ASP.NET MVC Schedule
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon