Hi Nicola,
Based on the provided information we could understand that you have rendered a custom component in the cell using queryCellInfo event and suspect that this might be why the group caption is displayed as ‘[object Object]’. We would like to let you know that the queryCellInfo event is only used for modifying the cell values in the UI level and it will not affect the Grid’s data source. And the Grid actions like, Grouping, Sorting will be performed based on the underlying data source of the column field value, so the cell changes in the queryCellInfo event will not affect the grouping action.
Your reported problem will occur if the object data type is present in the underlying data source for the column and as previously mentioned the object data type is not supported in the EJ2 Grid and that is why the group caption text might be displayed like you have mentioned. So you can achieve the mentioned requirement(changing/hiding the group caption value) using one of the below approaches,
Hiding the group caption text:
You can hide the group caption text by using the following CSS style,
|
.e-grid .e-groupcaption {
display: none;
} |
Changing the group caption text:
You can customize the group caption text by using the groupSettings captionTemplate property. Using this you can display the required text value as the group caption text. More details on this can be checked in the below documentation link,
Disabling grouping for the custom component rendered column:
Alternatively you can also disable grouping for the column where custom component is rendered by disabling the columns allowGrouping property as demonstrated in the below code snippet,
|
<e-column field='Mainfieldsofinvention' headerText='Main fields of invention' [allowGrouping]="false" width='200'></e-column> |
If this does not help achieve your requirement, then please elaborate on the requirement and share us the Grid code file(for checking how you have rendered the custom component in the queryCellInfo event) to validate further on this.
Regards,
Sujith R