Hi all,

Suppose my table has 100 rows of data and I need to insert a new row or delete a row somewhere in the middle of the table - can I do that without having to copy and paste the existing data into new rows?

Thanks...

Comments

Juc1 created an issue. See original summary.

patrickroma’s picture

Is this feature planned for future releases?

jenlampton’s picture

Category: Support request » Feature request

This would be a fantastic new feature. As a work-around you might export the current table field data as a CSV, and open that file in MS Excel or similar. Add the row where you like it, and then save the file as a new CSV. Then, import the new CSV with all that data back into the table field, and voila!

Changing to feature request.

jenlampton’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new4.1 KB

I was thinking about this... The "insert a row in the middle" problem could also be solved by allowing the user to add a row at the end, and then use tabledrag to drag it up into the middle much like we do with fields (not that Field UI should be used as an example of a good UI.) I spent some time adding tabledrag to the data-input form. Maybe give this a try and see if you think it's a good compromise?

jenlampton’s picture

Title: insert new row / delete row (newbie) » insert new row in the middle
jenlampton’s picture

StatusFileSize
new6.58 KB

I really liked this feature so have added it to the port of this module I have been working on for Backdrop CMS. This patch includes cleaned-up css for the tabledrag display.

jenlampton’s picture

Title: insert new row in the middle » insert new row in the middle or rearrange rows
jenlampton’s picture

StatusFileSize
new7.77 KB

This patch saves the rows in the correct order after sorting.

  • jenlampton committed 642922c on 7.x-2.x
    Issue #2578261: Add tabledrag for reordering of table rows.
    
jenlampton’s picture

Status: Needs review » Fixed

Tabledrag will be included in the next release of this module.

  • jenlampton committed c44dfa7 on 7.x-2.x
    Follow up to Issue #2578261: Fix bug with row sort order, also better...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.