adding groupSettings produces error about header texts

Hi

I am following the tutorial about the grid component:

https://ej2.syncfusion.com/angular/documentation/grid/getting-started/#enable-grouping

I have encountered the following problem: When setting the groupSettings, it does not find the columns' header texts of the columns in the groupOptions.


Capture:


error_groupSettings_1.png


Code section:


error_group_settings.png


ts component:

error_group_ts_component.png


Note: If I don't specify the group Options, It allows me to group data correctly.

Thanks in advance.

Regards,

Rafael


Attachment: gridsyncfusiontut1_82134b31.zip


1 Reply

RR Rajapandi Ravi Syncfusion Team June 23, 2021 12:02 PM UTC

Hi Rafael, 

Greetings from syncfusion support 

We have analyzed your provided application and found that you are not defining <e-columns> tag. It was the cause of the issue. To overcome the problem, we suggest you define the <e-columns> tag and achieve your requirement. Please refer the below code example for more information. 

 
<ejs-grid  
    [dataSource]='data' 
    [allowPaging]='true'  
    [pageSettings]='pageOptions' 
    [allowSorting]='true' 
    [sortSettings]='sortOptions' 
    [allowFiltering]='true' 
    [filterSettings]='filterOptions' 
    [allowGrouping]='true' 
    [groupSettings]='groupOptions' 
<e-columns> //define the <e-columns> tag here 
    <e-column field="OrderID" headerText="Order ID" textAlign="Right" width="90"></e-column> 
    <e-column field="CustomerID" headerText="Customer ID" width=120></e-column> 
    <e-column field="Freight" headerText="Freight" textAlign='Right' format='C2' width=90></e-column> 
    <e-column field="OrderDate" headerText="Order Date" textAlign='Right' format='yMd' width=120></e-column> 
</e-columns> //closing </e-columns> tag here 
</ejs-grid> 
 

Regards, 
Rajapandi R

Loader.
Up arrow icon