Upgrade from igniteui 8 to igniteui 12.2.3.
After that getting below error for igx tree grid:
<igx-tree-grid #treeGrid [data]="Data" [autoGenerate]="false" emptyGridMessage="Loading....." [isLoading]="isLoading" [allowFiltering]="false"
primaryKey="Id" foreignKey="parentId">
<igx-column field="approve" header=" " [width]="'120px'" >
<ng-template igxCell let-cell="cell" >
<button title="approve igxButton="raised" [disabled]="cell.value" *ngIf = "cell.row.rowData.parentId === -1" (click)="Approve(cell.cellID.rowIndex)" >
Approve
</button>
</igx-column>
</igx-tree-grid>
approve.ts file:
Hello Siva,
The reason why you are getting ‘undefined’ is that the accessors and properties have been changed from version 8 to version 12, in fact if you would like to access the row index of a certain cell it could be done with the following code:
cell.row.idnex
I also recommend you reviewing the API documentation for version 12, there you can review all the classes, interfaces, functions, enumerations etc.
For example, the way you could check which properties and accessors to use while trying to find out how to access the row index of a certain cell using version 12 is by reviewing the IgxGridCell class as well as the IgxTreeGridRow
Let me know if you need any further assistance.
Regards, Ivan Kitanov