Grid Search with multiple values

Hi I have a grid which has search functionality outside of grid. Basically, It's parent and child grid. since out of the box search is not possible on child grid. I had to make search (auto complete) outside grid. Now, when user selects values (which is unique user names) i can filter data  and find the IDs which belongs to rows in Parent Grid. but when i pass values to grid using below code

try{
let ProjectIds="";
this.viewData.filter(_=>args.itemData.value.toString().indexOf(_["Name"])>-1).forEach(a=>{
let pID=a.Title.toString().split('|')[0];
ProjectIds=ProjectIds+","+pID;
});
this.projectGrid.search(ProjectIds);
}catch(e){
this.projectGrid.searchSettings.key = '';
}

it's not able to search because it is comma separated IDs which is of course not the exact value in column

  1. How to select multiple values in autocomplete
  2. Based values selection of multiple values from point no.1 how can i search for multiple values in grid

1 Reply

JC Joseph Christ Nithin Issack Syncfusion Team December 15, 2021 03:57 PM UTC

Hi PDev, 

  Greetings from Syncfusion support. 

  By default in EJ2 Grid, the parent and the child grids will act as a unique grid only, based on the columns the user defines the parent and the child grids will be rendered. Every features in both the grids will work uniquely. Hence you cannot search both the parent and the child grid at the same time. The search operation must be performed separately for both parent and child grid. 

Query 1: How to select multiple values in autocomplete 

    By default in autocomplete you can only select one value at a time. Instead we suggest you to use the EJ2 Multiselect Dropdown component for selecting multiple items.  
 

Query 2: Based values selection of multiple values from point no.1 how can i search for multiple values in grid. 

  Before we proceed to the solution we would like you to share the following details. 

  • Do you want to search only in a particular column or do you want to search the entire grid.
  • Do you want to search the values in the child grid to find the parent grid?
  • Please explain your exact requirement.
  • Please share the screenshot or video for your requirement.
   
Please get back to us for further details. 

Regards, 
Joseph I. 


Loader.
Up arrow icon