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.
Unfortunately, activation email could not send to your email. Please try again.

Filter datamanager with dropdown list multiselect values

Thread ID:

Created:

Updated:

Platform:

Replies:

126064 Sep 21,2016 07:58 AM Sep 27,2016 01:33 AM JavaScript 3
loading
Tags: ejDataManager
Dina Abdelbary
Asked On September 21, 2016 07:58 AM


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));
   



Keerthana Rajendran [Syncfusion]
Replied On September 24, 2016 09:05 AM

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. 


Dina Abdelbary
Replied On September 26, 2016 03:53 AM

it is working, Thanks.

Keerthana Rajendran [Syncfusion]
Replied On September 27, 2016 01:33 AM

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. 


CONFIRMATION

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.

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.

;