Page 1 of 1

How can I create a dynamically table with CRUD feature?

Posted: 02 Dec 2019, 10:04
by mohammad66
Hi
I already used table from PrimeNG and I wanna dynamically do CRUD operations. It only works when I use a database, but when I add a row to list, all of the rows would switch to edit mode. how can I determine a specify row to edit?
Image

Re: How can I create a dynamically table with CRUD feature?

Posted: 02 Dec 2019, 15:47
by yigitfindikli
mohammad66 wrote:
02 Dec 2019, 10:04
Hi
I already used table from PrimeNG and I wanna dynamically do CRUD operations. It only works when I use a database, but when I add a row to list, all of the rows would switch to edit mode. how can I determine a specify row to edit?
Image
Hi,
You need to use dataKey property. And dataKey area should be different other rows. You can look this example;

https://stackblitz.com/edit/github-7fuj9l