Angular 4, Uppercase in primeng with editing

1.8k views Asked by At

I am using angular 4 and PrimeNg datatable with editing, is it possible to force the upper case in 1 column when user is writing? maybe calling toUpperCase on keyup? or something better

1

There are 1 answers

0
BillF On

Why not use an editor template with an (ngModelChange) function to convert the value to uppercase

Look at the datatable demo showing the use of the editor template. Notice how the template uses an [(ngModel)]? Change that to an [ngModel]="yourModel" and add (ngModelChange)="yourFunction(event)"

PrimeNG DataTable editable example