How to send custom info while loading the data for scheduler

Team,

while loading data into the scheduler we are calling as shown in the below

sheduler.load(apiUrl);
it calls Get Method and on the ServerSide APi function Get(datetime datefrom, datetime dateTo)

and it is loading the data and I am able to make working.

I have scenario where I need to load based on the departments in my Org (where I have List of Orgs displayed in a combox of my view, when user selects certain org I want to pass the org Id (which I get from the combo selected) along with the other two parameters i.e.

Get(guid orgId, datetime datefrom, datetime dateTo)

Basically I want to load only one department events at a time instead of loading all the departments.

document.addEventListener(“DOMContentLoaded”, function (event) {

    debugger;
    //show spinner while loading data
    scheduler.config.show_loading = true;

    scheduler.config.details_on_dblclick = true;

    //Set Starting and ending hours of Scheduler
    scheduler.config.first_hour = 6;
    //scheduler.config.last_hour = 24;
    scheduler.config.limit_time_select = true;

    // initializing scheduler
    scheduler.init("scheduler_here", new Date(2022, 09, 01));

    //To enable the dynamic loading, call the setLoadMode method:
    scheduler.setLoadMode("week");

    scheduler.updateView(new Date(currentYear, currentMonth, 01), "week");

    scheduler.attachEvent("onLoadStart", function () {
        debugger;
        scheduler.config.readonly = true;
    });

    scheduler.attachEvent("onLoadEnd", function () {
        debugger;
        scheduler.config.readonly = false;

        //spinner off
        scheduler.config.show_loading = false;
    });

    // initiating data loading
    scheduler.load("/api/SchedulerApi");

    scheduler.attachEvent("onLoadError", function (response) {
        dhtmlx.message("Failed to load data");
    });

    scheduler.attachEvent("onSaveError", function (ids, resp) {
        dhtmlx.message("Failed to  update data");
    })

    // initializing dataProcessor
    var dp = new scheduler.createDataProcessor("/api/schedulerApi");

    // and attaching it to scheduler
    dp.init(scheduler);

    // setting the REST mode for dataProcessor
    dp.setTransactionMode("REST", false);

Note : I am using ASP.NET MVC, SQL SERVER and Javascript

Hello @suresh9sb ,

Looks like you are searching for server-side filtering functionality that is described by the following link:

Especially filtering during loading:

If you prefer to use the Client side API(as you provide in code fragment), it allows filtering events on client:
https://docs.dhtmlx.com/scheduler/filtering.html
(so events will be loaded, but won’t be displayed based on filter config).

Best regards,