How can I create a dynamically table with CRUD feature?

UI Components for Angular
Post Reply
mohammad66
Posts: 2
Joined: 02 Dec 2019, 09:47

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

yigitfindikli
Posts: 449
Joined: 08 Aug 2018, 14:09

02 Dec 2019, 15:47

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

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests