column with foreign key defined not working for mulitple values

Hi,

I didn't succeed to enable the display of multiple values in a column with foreignKey and datasource defined.

Here is a stackblitz demonstrating my need: https://stackblitz.com/edit/yt4z7g?file=data-source.ts

I need for the customerId to contain multiple values, each value should be translated regarding its code in the datasource (rendering values of a multiselect).

Thanks for your response.
Matt


1 Reply 1 reply marked as answer

PG Praveenkumar Gajendiran Syncfusion Team February 26, 2021 12:51 PM UTC

Hi Matthieu, 
Greetings from Syncfusion support. 
By analyzing your query and provided information, we understand that you having an array of value in the grid column and you need to perform foreignKey feature on this column. 
By default, the EJ2 Grid column only supports number, string, date, dateTime, Boolean, checkbox type values, and which is not supports array type value. Refer to the below documentation. 
Documentation: https://ej2.syncfusion.com/angular/documentation/grid/columns/#column-type

But , you can show an array of values in the Grid by using the valueAccessor property of Grid columns. The valueAccessor is used only for the display purpose and we cannot perform any Grid actions like Filtering, Searching, Grouping, Sorting, etc., to this column(when you are display the custom text through valueAccessor ). Refer to the below documentation.

Documenatation: https://ej2.syncfusion.com/angular/documentation/grid/columns/#display-array-type-columns 
Note :  The Grid can perform the actions like Filtering, Sorting, Searching, Grouping, aggregates, etc., are based on the column field and its dataSource value. So, we are unable to perform the value while updating through valueAccessor. This is the behavior of EJ2 Grid.  
Please let us know, if you need further assistance. 
Regards,
Praveenkumar G
 


Marked as answer
Loader.
Up arrow icon