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. Image for the cookie policy date

Filtering and applying changes from remote source

I've setup the schedule, it works well with its integrated controls, but can't find an example of filtering after initializing the control.
So, for example, once it loaded the default data, I need to send another request to the server with some filters and load the new data from it.

Tried something like this, it fires a request but the changes aren't applied to the schedule. Can't find a clear example of what should I do in the promise to reflect the changes.
this.dataManager.executeQuery(new Query().page(1, 8)).then(()=>{

});

1 Reply

NR Nevitha Ravi Syncfusion Team June 13, 2019 09:57 PM

Hi Vasil, 

Greetings from Syncfusion Support. 

We suspect that you might missed to assign the filtered data collection to the scheduler datasource which could be the problem. Please use the following code to load the new filtered data and for the same we have prepared sample for your reference in that the events with ID as 100 has been filtered and assigned to scheduler which can be viewed from the following link. 

  click() { 
    var dataManager1 = "https://js.syncfusion.com/demos/ejservices/api/Schedule/LoadData"; 
    var dManager = new DataManager({ url: dataManager1 }).executeQuery(new Query()).then((e) => { 
      var data = (e as any).result; 
      let result: Object[] = new DataManager(data).executeLocal(new Query().where('Id', 'equal', 100)); 
      this.scheduleObj.eventSettings.dataSource = result; 
      console.log(result); 
    }); 
  } 

Please try out the sample and let us know if you need any further assistance.  

Regards, 
Nevitha 


Loader.
Live Chat Icon For mobile
Up arrow icon