Loading events in scheduler

Hi
iam using dhtmlx scheduler and loading the data using DataAction with below code which is called from jquery.
public ContentResult MapEvents()
{

        List<Appointments> obj = (List<Appointments>)Session["totalappointments"];
        var data = new SchedulerAjaxData(obj);
        List<object> sections =(List<object>)Session["sections"];
        data.ServerList.Add("sections", sections);
        return data;
    }

Is there any other way so that i can add the events to scheduler without using DataAction so that ajax call will be avoided which is delaying the loading of events now

Hi,
sure, you can load the data when you initialize the scheduler, so it won’t need to send an additional ajax request:

List<Appointments> obj = (List<Appointments>)Session["totalappointments"];
List<object> sections =(List<object>)Session["sections"];

var scheduler = new DHXScheduler(this);
scheduler.LoadData = false;
scheduler.Data.Parse(obj);

var timeline = new TimelineView("timeline", "room_id");
timeline.ServerList = "sections";
timeline.AddOptions(sections);