I am using angular2. I have a datatable. I am able to edit particular cell when I click on it. But I also want the last column to appear for that particular row whose cell I am editing.
Suppose I want to edit the 1st row 2nd element. Basically 2nd element is editable when I click it but at the same moment, I need the last column to show all 3 buttons save, cancel and delete to appear only for 1st row.
<p-dataTable [value]="tableData" editable="true" editMode="cell">
<p-column field="id" header="CUSTOMER*" [editable]="true"></p-column>
<p-column field="category" header="CATEGORY" [editable]="true"></p-column>
<p-column field="featureName" header="FEATURE NAME" [sortable]="true" [editable]="true"></p-column>
<p-column field="devEstimate" header="DEV ESTIMATE" [editable]="true"></p-column>
<p-column field="supportEstimate" header="SUPPORT ESTIMATE" [editable]="true"></p-column>
<p-column field="started" header="STARTED" [editable]="true"></p-column>
<p-column field="release" header="RELEASE/TARGET" [sortable]="true" [editable]="true"></p-column>
<p-column field="notes" header="NOTES" [editable]="true"></p-column>
<p-column [hidden]="!isEditable">
<template let-col let-row="rowData" let-index="rowIndex" pTemplate="body" >
<div>
<button pButton type="button" label="Save"></button>
<button pButton type="button" label="Cancel"></button>
<button pButton type="button" label="Delete"></button>
</div>
</template>
</p-column>
</p-dataTable>
DataTable is deprecated, use TurboTable instead.
. – user4676340