Reputation: 451
I have a requirement to be able to display, sort, edit and add new rows to a table which gets/stores it's data in a database.
I have looked at using ag-grid for angular 2, and I am able to display & sort no problem. However, I can not find any documentation for adding a new row. Is ag-grid a good choice for adding/editing data? If so, how do you handle adding a new row?
Secondly, I have heard good things about primeNG but am already using ng2-bootstrap components. Is it a bad idea to use both?
Upvotes: 1
Views: 2884
Reputation: 86740
Looking for table with multiple functionality with a minimum code simply go fo PrimeNg
, yes no problem if you are using ng2-bootstrap as well as primeng components side by side, also there are alot of functionalitys that are provided by primeng like
Sorting, Searching, Templating, Filtering, Export, Editable and much more
for adding new row at run time simply add(push) new object into the array of rows.
Have a look here
Upvotes: 3
Reputation: 2411
right now, to add new row to ag-Grid, you need to call setRowData() (or bind new data to the row-data attribute).
adding and removing rows in ag-Grid is in the pipeline, will be included in a release later this year.
Upvotes: 1