N.Zukowski
N.Zukowski

Reputation: 601

Smart-Table vs. Angular-DataTables

For displaying my tabled data I am currently using the angular datatables Here's the link. I am mostly satisfied with it up to some things.

The only problem with the angular datatables is, that I cannot manually delete a row from the table. There is some angular way for editing and deleting rows, but then the table get rerendered, so all sorting and paginations get lost. I found another solution (smart tables), but I didn't find if there is a possibility to edit/delete a row entry (from the table). Here is a little comparison.

I use angular-datatables for the following purposes:

  1. Displaying some data with pagination and/or scrollbars
  2. Defining own header width for every column
  3. Searching over all columns / searching over some columns
  4. Rendering some columns with custom html code (for example I put some action buttons in it, or make the entries in some cols to links)
  5. Sorting values on every column (ascending, descending)
  6. Disabling sorting on some columns
  7. Multiselect on rows (highlighting a row and save the id of the dataset behind the row for actions)
  8. NO editing/deleting rows

My question is, if you can do the same with smart-table

I figured out, that already all points are implemented well.

  1. pagination: yes / scrollbars: no?
  2. yes
  3. yes
  4. yes
  5. yes
  6. (yes?)
  7. multiselect: yes, accessing selected data id no?
  8. no?

I am only not sure about the 1st, 6th, 7th and 8th point. Can you give there a statement?

I could switch to smart tables, if there are all listed options available in it.
Thanks

Upvotes: 3

Views: 2994

Answers (1)

svarog
svarog

Reputation: 9837

  1. Pagination? yes, you have pagination out of the box, you can even change the default template and functionality
  2. Sorting? you can ENABLE sorting by adding an optional st-sort directive to the column header
  3. Multiselect? no, but it's easy to implement over smart-table (done it once)
  4. Deletion? you can delete rows (that is, doing DELETE over http and slicing the array if successful)

and if there is any additional functionality you'll need in the future that ST doesn't already have, you can create your own plugin for it. the docs are you friend

Upvotes: 3

Related Questions