Hi,
I am using schedule control with horizontal view and, multiple resource grouping , based on some drop downs in my view need to repopulate everything in the schedule , like groups, resources, appointments...
I need to load resources and appointments when user select an office from drop down.
I tried some thing like this below and not working, its just for appointments, i need to load resources also via ajax.
i am writing all the javascript code in a separate js file
var url = $('#schedule').data('request-url');
$.ajax({
url: url,
type: "GET",
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data) {
//$("#Schedule1").ejSchedule({ group: { resources: [args.model.text, "Owners"] } });
$("#Schedule1").ejSchedule({
appointmentSettings: {
dataSource: data,
id: "StaffId",
subject: "Subject",
startTime: "StartTime",
endTime: "EndTime",
description: "Description",
allDay: "AllDay",
recurrence: "Recurrence",
recurrenceRule: "RecurrenceRule",
resourceFields: "GroupId,StaffId"
}
});
}
});