I’m using jqxpivotgrid and trying to set the value of the cell [(onPivotcellclick)].
Here’s my code
pivotgrid.component.html
<jqxPivotGrid #pivotGrid
[width]="800"
[height]="600"
[source]="pivotDataSource"
[treeStyleRows] = "false"
[autoResize] = "true"
[multipleSelectionEnabled] = "true"
(OnPivotcellclick) ="onPivotcellclick ($event)">
</jqxPivotGrid>
pivotgrid.component.ts
@ViewChild('pivotGrid', {static:true}) myPivotGrid: jqxPivotGridComponent;
onPivotcellclick(event): void
{
var cells = this.myPivotGrid.getPivotCells();
cells.setCellValue(event.args.pivotRow, event.args.pivotColumn,"55");
}
Here, when I click on cell, I’m getting following error:
PivotgridComponent.html:2 ERROR ReferenceError: dsType is not defined
at c.<computed>.setCellValue (jqxpivotgrid.js:8)
at PivotgridComponent.onPivotcellclick (pivotgrid.component.ts:103)
at Object.eval [as handleEvent] (PivotgridComponent.html:9)
at handleEvent (core.js:34777)
at callWithDebugContext (core.js:36395)
at Object.debugHandleEvent [as handleEvent] (core.js:36031)
at dispatchEvent (core.js:22519)
at core.js:24416
at SafeSubscriber.schedulerFn [as _next] (core.js:27877)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:185)