Posted 28 April 2020, 6:28 pm EST
Hello,
From the below screenshot: Conversion is a calculated field which is using getValue function to do the dynamic calculation.
What I’m looking for is :
Provide User capability to :
Step1: Add Column button : To add empty column to the grid.
Step2: Calculate button: Where he can perform some calculation and display on grid.
I was able to add an empty column to the grid, but this column is not available when I try to get the field from the grid using ```
this.ng.columnFields.getField(‘New Column’);
addNewColumn() {
this.pivotGrid.columns.push(new wjcGrid.Column({ header:
‘new_column’, binding: ‘new_column’}));
}
calculate () { let field = this.ng.columnFields.getField('New Column'); field.getValue = function (item) { return 100 * 5 ; // demo calculation }; this.ng.refresh(); }
[img]https://gccontent.blob.core.windows.net/forum-uploads/file-f4b0c6f5-670b-46a1-9fdd-1f26c020ff63.png[/img]