Thanks for your update.
In your project, if CrudURL is not required then ajax post can be used within Create event to load the appointments initially where we can access the controller function values as shown below.
<Code>
.ScheduleClientSideEvents(eve => eve.Create("onCreate2"))
function onCreate2() {
$.ajax({
url: "/Home/GetData", type: 'POST', success: function (result) {
alert(result.status);
var object = [];
// Stores the result values to the object collection.
for (var i = 0; i < result.dataColl.length; i++) {
object[i] = {
Id: result.dataColl[i].Id,
Subject: result.dataColl[i].Subject,
StartTime: new Date(result.dataColl[i].StartTime.match(/\d+/)[0] * 1),
EndTime: new Date(result.dataColl[i].EndTime.match(/\d+/)[0] * 1),
Description: result.dataColl[i].Description,
AllDay: result.dataColl[i].AllDay,
Recurrence: result.dataColl[i].Recurrence,
RecurrenceRule: result.dataColl[i].RecurrenceRule
}
}
$("#Schedule1").ejSchedule("option", "appointmentSettings.dataSource", object); // Assigns the DataSource to the Schedule control.
},
});
}
public JsonResult GetData()
{
IEnumerable data = new DataClasses1DataContext().ScheduleDatas.Take(100);
var values = new { dataColl = data, status = "Testing" };
return Json(values, JsonRequestBehavior.AllowGet);
}
</Code>
Regards,
Karthigeyan