css - PrimeNg Datatable style a cell -


i'm using primeng datatable follows , need put specific css class each cell i'm able pass css class [class]="cssclassname" coming model class applied when control focused. there way apply class without need of focus control?

thanks in advance.

the example appears on documentation

<p-datatable [value]="cars" [editable]="true" resizablecolumns="true">     <p-column *ngfor="let col of cols,  let c = index" [field]="col.field" [header]="col.text" [editable]="true" >      <ng-template let-col let-car="rowdata" ptemplate="editor" let-r="rowindex">       <div [class]="cssclassname">          <input [(ngmodel)]="car[col.field]" appendto="body" [class]="cssclassname">       </div>     </ng-template>      </p-column> </p-datatable> 

you can apply styleclass on reflect on cell.

<p-column [style]="{'text-align':'left'}" field="field name" header="header" [sortable]="true" styleclass="test">


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -