Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
Cannot invoke an object which is possibly 'undefined' on row.delete()
posted

Hi,

Seeing this error on the row.delete() method:

"   Cannot invoke an object which is possibly 'undefined'  "

The method is the following:

public removeRow(rowIndex: number) {
    const row = this.hierarchicalGrid.getRowByIndex(rowIndex);
    console.log(row);
    row.delete();
  }
It is the only error I´m getting in both the .ts and html components, any ideas on how to fix it?
Thanks,
Jose