I added this but when inspecting element using Chrome DevTools, the click function doesn't show!
Here's my code:
<mat-table [dataSource]="dataSource1" class="mat-table">
<!-- Position Column -->
<ng-container matColumnDef="Objname">
<mat-header-cell *matHeaderCellDef> ObjName </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.objname}} </mat-cell>
</ng-container>
<!-- Weight Column -->
<ng-container matColumnDef="Successcount">
<mat-header-cell *matHeaderCellDef> Successcount </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.successcount}} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row (click)="getRecord(element.objname)" *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>