Searching Column with Multiple items

Hi Team,


I have Roles column in Grid with multiple items as Comma separated Values.

My Response from API for roles is like below,


"Roles":[
{
"Id":"4234erwfgvwefwe",
"Name":"System Administrator"
},
{
"Id":"4341421342314",
"Name":"Organization Administrator"
}
]

I will retrieve this response and do CSV and display in Grid. But I cannot able to do search with this Roles column. When I search with Other columns bind to the grid that works fine.

How to Resolve this ? Kingly suggest the solution


Thanks
Nambi R

1 Reply

TS Thiyagu Subramani Syncfusion Team September 17, 2021 09:04 AM UTC

Hi Nambi, 

Greetings from Syncfusion support. 

We checked your query with provided the details and you have defined multiple values in single column value using comma separator which is showing on “Roles” column. 

By default, the EJ2 Grid column only supports number, string, date, dateTime, Boolean type values, and which is not supported array type value. Please refer to the below documentation.  
  

We can show an array of values in the Grid column. But this is used only for the display purpose. We cannot perform Grid actions like Filtering, Searching, Grouping, Sorting, etc., to this column. Because the Grid can perform the actions (like sorting, grouping ,filtering) based on its dataSource value. This is the default behavior of EJ2 Grid. 

Note: By default in EJ2 DataManager we have provided support for one to one relation only so it does not work for one-to-many (subitems). Its default behavior current Grid architecture. 

Please let us know, if you need further assistance. 

Regards, 
Thiyagu S 


Loader.
Up arrow icon