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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filter the resources

Thread ID:





129127 Feb 28,2017 03:48 PM UTC Mar 2,2017 04:01 AM UTC ASP.NET MVC 3
Tags: Schedule
Cornel Amarandei
Asked On February 28, 2017 03:48 PM UTC


I want to filter on the client the resources of a Schedule("TeamSchedule"), based on what I write on a TextBox("FilterTextBox").

What I've done so far is this:

function onFilterClick() {
        var schObj = $("#TeamSchedule").data("ejSchedule");        
        schObj.model.resources[0].resourceSettings.dataSource = ej.DataManager(schObj.model.resources[0].resourceSettings.dataSource).executeLocal(ej.Query().where("text", ej.FilterOperators.contains, $("#FilterTextBox").val()));

This is working, but the problem is that after I first filter by a resource, I cannot go back to all the resources, they are lost. So in this way if I want to filter again for a different resource, the filter will be search on the result of the first filter and not in the all resources.


Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 1, 2017 11:10 AM UTC

Hi Cornel,   
Thank you for contacting Syncfusion support.   
In the provided code example, resource data source is altered with the filtered object, therefore initial data source will not maintain. We have prepared the sample to render the resource based on the user selection which can be viewed from the below location.   
Kinldy refer the below code example used in the sample. 
function onCreate(args) { // this function will be during the initial load 
            resData = $.extend(true, [], this.model.resources[0].resourceSettings.dataSource); 
function onChange(args) { // this function will be called when the radio button is clicked 
            var resourceObject = ej.DataManager(resData).executeLocal(ej.Query().where("text", ej.FilterOperators.equal, args.model.text)); // here we will filter particular resource that is clicked 
                group: { 
                    resources: ["Owners"] 
                resources: [{ 
                    field: "ownerId", 
                    title: "Owner", 
                    name: "Owners", allowMultiple: true, 
                    resourceSettings: { 
                        dataSource: $.extend(true, [], resourceObject), 
                        text: "text", id: "id", groupId: "groupId", color: "color" 

Cornel Amarandei
Replied On March 1, 2017 01:35 PM UTC

Thanks, it works (with what I've done and some ideea from your sample:) ).


Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 2, 2017 04:01 AM UTC

Hi Cornel 
We are happy that our solution has fulfilled your requirement. 
Please let us know if you need further assistance. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon