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

Filter datamanager with dropdown list multiselect values


i have a problem in filtering data of datamanager, as i have a grid and above it there is a multi select dropdown 
i wanna filter with the selected option(s) of this dropdown, is it possible? 


in case of single value selected , it works perfect, the problem appears in multiselection

filteredActiveData = ej.DataManager(data).executeLocal(ej.Query().where("groups", ej.FilterOperators.equal, itemsObj.option("value"), false));
   



3 Replies

KR Keerthana Rajendran Syncfusion Team September 24, 2016 01:05 PM UTC

Hi  Dina, 

We had prepared a sample for your requirement . Please refer the below given link: 



We have pushed the selected items and mapped the value as dataSource of Grid .  Please refer the below given code. 

Code: 
function onchange() 
      { 
      
         
         var griddata=[]; 
          var dataSource=[]; 
               
        var itemsObj=$("#select").data("ejDropDownList"); 
          var val=(itemsObj.option("value")).split(","); 
                               for (i=0;i<val.length;i++) 
                               { 
                                
                                var values=parseInt(val[i]); 
             
                                 var data=ej.DataManager(window.gridData).executeLocal(ej.Query().where("EmployeeID", ej.FilterOperators.equal, values, true)); 
           data.map(function(x){dataSource.push(x)}) 
                                
                               } 
                              
                                $("#Grid").ejGrid({ 
            
          dataSource: dataSource 
        }); 
           
      } 




Regards, 
Keerthana. 



DA Dina Abdelbary September 26, 2016 07:53 AM UTC

it is working, Thanks.


KR Keerthana Rajendran Syncfusion Team September 27, 2016 05:33 AM UTC

Hi Dina, 

Thanks for your update. Please get back to us if you require further assistance on this. We will be happy to assist you 

Regards, 
Keerthana. 


Loader.
Live Chat Icon For mobile
Up arrow icon