Does Aggregate rows allows cell edit ??

Hi Guys,

this is my settings for Edit cell in tree grid. This seems to be working for cells in grid but it also edits the total/max column which shows aggregates. How do i stop editing specific rows which shows aggregates.



this.editSettings = {
allowEditing: true,
allowAdding: false,
allowDeleting: false,
mode: "Normal"
};


5 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 31, 2021 04:48 PM UTC

Hi Parth, 

Thanks for contacting Syncfusion Support. 

Query#:- How do i stop editing specific rows which shows aggregates. 
 
We have checked your reported problem in your provided sample with version 18.2.55. The reported problem occurs in this version alone. 

So please upgrade to latest version to resolve the problem. In the below sample, with version 19.1.54 version (Couldn’t perform Editing on Aggregate rows). 


Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 



PD PDev April 1, 2021 03:47 AM UTC

your example code is not working. It's not even calculating total on cell edit. 

Also, I can't even set edit mode to "Normal". where my package.json shows below
"@syncfusion/ej2-angular-buttons": "^19.1.54",
"@syncfusion/ej2-angular-calendars": "^19.1.54",
"@syncfusion/ej2-angular-dropdowns": "^19.1.54",
"@syncfusion/ej2-angular-inputs": "^19.1.54",
"@syncfusion/ej2-angular-treegrid": "^19.1.54",








FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 1, 2021 02:31 PM UTC

Hi Parth, 

Query#:- code is not working. It's not even calculating total on cell edit.  

We have checked your reported problem with(CellEditing and Aggregates) but we are unable to reproduce any problem at our end. 

Refer to the sample Link:- 
 

If possible replicate the issue in the above sample and revert us or share us any hosted link to validate the problem. 

Query#:-  I can't even set edit mode to "Normal". where my package.json shows below 
 
In our TreeGrid, we have only Cell, Row, Dialog and Batch type of Edit modes. Refer to the documentation Link for more information:- 

So we suggest you to use “Cell” mode for Editing if you want to perform Editing only for Cells. 


Regards, 
Farveen sulthana T 



PD PDev April 1, 2021 11:50 PM UTC

Thanks for the reply.

Can you please check what is wrong with below code ? as my columns are dynamic and so my aggregates are. i could successfully create dynamic columns but as and when i add dynamic aggregates. it throws an error Property 'field' does not exist on type 'Object'. <e-column [field]="column.field">

<ejs-treegrid #treegrid [dataSource]='data' [treeColumnIndex]=0 height='100%'
childMapping='states' [columns]='treegridColumns' [filterSettings]="filterSettings" [selectionSettings]='selectionSettings'
[allowFiltering]=true [allowSorting]=true [allowReordering]=true [allowExcelExport]='true'
[editSettings]='editSettings' [aggregates]="treegridColumnsAgg" *ngIf='treegridColumns.length'>
</ejs-treegrid>
<e-aggregates>
<e-aggregate [showChildSummary]="false">
<e-columns>
<!--e-column field="Jan-2020" type="Sum" format="C2" columnName="Jan-2020">
<ng-template #footerTemplate let-data>Total: {{data.Sum}}</ng-template>
</e-column-->

<ng-template #footerTemplate ngFor let-column [ngForOf]="treegridColumns">
<e-column [field]="column.field">
</e-column>
</ng-template>

</e-columns>
</e-aggregate>
</e-aggregates>

Also, below is my code to create dynamic aggregates

createColAggregates(gridCols:Object[]){
let cols:Object[]=[];
try{
gridCols.forEach(col=>{
cols.push({
type: 'Sum',
field: col,
columnName: col,
footerTemplate: "${Sum}"});
});
}catch(e){
console.log('Error while creating column aggregates');
}
return cols;
}


MP Manivannan Padmanaban Syncfusion Team April 2, 2021 07:45 AM UTC

Hi Parth, 

Thanks for the details. 

We need some more details, in order to proceed further. So, please get back to us with the below details. 

  1. Share the complete stack trace of the error.
  2. How you assigned the dynamically generated aggregate( i.e. createColAggregates) to Tree Grid.
  3. Share the complete Tree Grid code example.
  4. Also, share the video demonstration of the issue.

Regards, 
Manivannan Padmanaban 


Loader.
Up arrow icon