Hi Krailit,
Greetings from Syncfusion support.
Based on your query, you want to change the filed
name and the grouped column. Your requirement can be achieved by clearing the
grouping first by using the `clearGrouping` method and then you can
change the filed name by getting the column using the `getColumnByField`
and group the column again by using the `groupColumn` method.
Refer the below code example:
btnClick() {
this.grid.clearGrouping();
var column = this.grid.getColumnByField('OrderID');
column.field = 'EmployeeID';
this.grid.refreshColumns();
setTimeout(() => {
this.grid.groupColumn('EmployeeID');
}, 100);
}
|
Thanks,
Joseph I.