Posted 12 August 2018, 9:27 pm EST
Hi,
To get the sortInfo when a row field is sorted you may handle the sortedColumn event on the pivotGrid and perform required operation.
Please refer to the following code snippet:-
pivotGrid.sortedColumn.addHandler((s,e)=>{
//check if row field sort
if(e.panel.cellType!=wijmo.grid.CellType.TopLeft) return;
let field= s.engine.fields.getField(e.panel.getCellData(e.row,e.col));
let isDesSort = field.descending;
//do something with this info
});
You may also refer to the following fiddle:-
http://jsfiddle.net/w3qkhzec/
Last but not least, when I use viewDefinitionChanged() method, I really can’t get the “event” value:
<<<<<<<<<<<<<<<<<<<<<
This is the default design behaviour as viewDefinitionChanged event passes EventArgs as the agrs argument which have no info associated with it.
To get the viewDefinition inside the viewDefinitionChanged handler, you may use viewDefinition property.
Please refer to the following code snippet:-
engine.viewDefinitionChanged.addHandler((s,e)=>{
let viewDef = engine.viewDefinition;
//do somrthing with viewDef
});
~Sharad