Hello,
I have another question regarding the Treegrid in Vue.
I have hierarchical data with some amount of currency in one field and would like to aggregate this amount in a sum footer.
If I use the the standard sum footer, the parent and child entries are summed up.
But the parent record reflects already the summed up amount of the childs. Therefore the footer displays the wrong amount.
How to achieve a way to have only the childs summed up?
f.e.
1 2000
1.1 1800
1.2 200
2 3200
2.1 1200
2.1.1 1000
2.1.2 200
2.2 2000
------------
footer aggregate: 5200
Another question is spanned headers.
I would like to have several spanned headers with programmatically changes. This means I add 3 columns with a new span header while preserving the old ones.
HEADER 1 HEADER 2
col 1 col2 col 3 col4
If I do it in Vue like this
var columnsresult = self.$refs.leistungsstandtreegrid.$el.ej2_instances[0].getColumns()
columnsresult.push({
field: headerstring,
columns: [ { field: realwertstring, headerText: 'Realwert' },
{ field: prozentstring, headerText: '%' },
{ field: summestring, headerText: 'Summe' }]
})
self.$refs.leistungsstandtreegrid.$el.ej2_instances[0].columns = columnsresult
self.$refs.leistungsstandtreegrid.$el.ej2_instances[0].refreshColumns()
self.$refs.leistungsstandtreegrid.$el.ej2_instances[0].refreshHeader()
the old spanned headers disappear.
Thanks a lot for your help!
Martin