Skip to main content

Posts

Showing posts with the label Material Angular Table All Selection

Material Angular Table Column Header With Multi Selection,Material Angular Table Column Selection,Mat-Table

Material Angular Table Column Header With Multi-Selection| Material Angular Table Header Column Check Box 
Sometimes we need multi-selection in a single click & here we discussed. Knowledge required MatCheckboxModule-mat-checkbox,MaterialCheckBox Module MatTableModule- mat-table,MatTable Module TwoWayBinding Typescript array  Step 1: Modules to import  import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {MatTableModule} from '@angular/material/table'; import {MatCheckboxModule} from '@angular/material/checkbox'; Step 2: Have to define a class  type for two way binding with mattable
export interface people {
  name: string;
  Sno: number;
  canspeak: boolean;
  canwrite: boolean;
}
Step 3 : Create an array for the people type  const ELEMENT_DATA: people[] = [
  {Sno: 1, name: 'John', canspeak: false, canwrite: false},
  {Sno: 2, name: 'Miller', canspeak: false, canwrite: false},
  {Sno: 3, name: 'Peter…