Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

449
Views
Disable/Enable Input in Angular Mat Table with mat slide toggle

My question is i have a angular mat table in which i have a toggle and input text in each row , when i click on the toggle i need to disable/enable the input text of that particular row not all the inputs texts.

<ng-container matColumnDef="StudentToggle">
    <th mat-header-cell *matHeaderCellDef> StudentToggle</th>
    <td mat-cell *matCellDef="let element;let i = index" [formGroup]="element" >
    <mat-slide-toggle formControlName="StudentToggle" 
        (click)="edit($event,element)"
        >
    </mat-slide-toggle>
    </td>
</ng-container>
<ng-container matColumnDef="Marks">
    <th mat-header-cell *matHeaderCellDef> Marks </th>
    <td mat-cell *matCellDef="let element" [formGroup]="element">
    <mat-form-field floatLabel="never">
        <input [disabled]="element.Marks"   matInputformControlName="Marks" placeholder="Enter Marks"
            oninput="this.value = this.value.toUpperCase()" required>
        <mat-icon matSuffix *ngIf="element.controls['isDeletable'].value">edit
        </mat-icon>
    </mat-form-field>
    </td> 
</ng-container>
**TS:**
  edit(event,element){
  //  console.log("editClicked: +"+ event);
    element.Marks= !element.Marks;
  }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!