ce icon indicating copy to clipboard operation
ce copied to clipboard

none of function is not working in onchange() in Angular

Open gargri opened this issue 6 years ago • 3 comments

hi, I am trying to use function in onchange() but it is not working in angular and i try to do this one https://jsfiddle.net/tsepakkwan/djm03fua/2/ but in angular i m not able to to add any function inside onchange() it is showing error that setData is not a funtion

gargri avatar Aug 20 '20 07:08 gargri

https://codesandbox.io/s/twilight-hooks-moq79

export class AppComponent {
  @ViewChild("spreadsheet") spreadsheet: ElementRef;
  @ViewChild("button") button: ElementRef;
  title = "an";

  ngAfterViewInit() {
    var t = jexcel(this.spreadsheet.nativeElement, {
      minDimensions: [40, 10],
      onchange: function (element, cell, x, y, value, oldValue) {
        alert(value);
      }
    });

    this.button.nativeElement.onclick = function () {
      t.insertRow();
    };
  }
}

pphod avatar Aug 20 '20 20:08 pphod

no this is not i m asking onchange(instance, cell, x, y, value,cellName) { console.log(instance.prop=cell); console.log(instance); console.log(cell); console.log(x); console.log(y);

console.log(value);
console.log(cellName);
this.table.hideRow(1);
console.log('New change on cell ' + jexcel.getColumnNameFromId([4, y]) + ' to: ' + value + '');

} this is my code and when i m using hideRow() it show me error

gargri avatar Aug 21 '20 07:08 gargri

i want to do is : when i update or change any cell value then in the same row last cell value will automatically change from 0 to 1

gargri avatar Aug 21 '20 07:08 gargri