如何从表格中获取数据?

时间:2017-09-06 22:06:13

标签: primeng primeng-datatable

我想通过我的表格查看已编辑的记录:

<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 个答案:

答案 0 :(得分:1)

onEditComplete提供列信息和已编辑的行数据。

来自primeng网站

onEditComplete: Callback to invoke when cell edit is completed.

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