how to get the data from a table primeng?

2.3k Views Asked by At

I want to go through my table to see the edited records:

<p-dataTable #dtParam [value]="parameterSecurity" [immutable]="false" [(selection)]="selectParam" dataKey="parameterId" [editable]="true" (onEditInit)="cellDirty($event)">
     <p-column [style]="{'max-width':'300px'}" [editable]="true" field="parameterId" header="Parámetro"></p-column>
     <p-column [style]="{'max-width':'300px'}" [editable]="true" field="value" header="Valor"></p-column>
     <p-column [style]="{'max-width':'300px'}" [editable]="true" field="description" header="Descripción"></p-column>
</p-dataTable>
1

There are 1 best solutions below

0
On

onEditComplete provides the column info and the row data that was edited.

From the primeng site

onEditComplete: Callback to invoke when cell edit is completed.

  • event.column: Column object of the cell
  • event.data: Row data
  • event.index: Row index