Is there any way that you could have a funcationality for inserting a row or column mid-table? Say, for instance, someone needs to add a row after the 2nd row - right now, you would have to re-type the entire table after the 2nd row, adding in the new row manually.

Comments

giorgio79’s picture

Yes, an Add Row or Add Column feature would be nice:
http://plugins.jquery.com/project/tableAddRow

Perhaps not mid table, but at least at the end of the table instead of rebuilding the entire table.

Here is live demo (this adds rows at the end of table)
http://cloudgen.w0ng.hk/jquery/table.addrow.php

giorgio79’s picture

Another possible Drupal solution

http://drupal.org/project/multicrud

kevin hankens’s picture

Yeah, those are both really interesting. I'm on vacation this week, but I'll try to do some toying around next week.

Thanks for the links!

donquixote’s picture

As the author of multicrud, I would like to warn about using it for the CCK table field module.

multicrud is aimed at situations where the table rows have a predefined structure. You can add table rows dynamically, but not table columns. Any further specialization of multicrud will be aimed at crud-like use cases, as described on the module page. The strong specialization allows to keep the "delete" checkbox and the mechanics for row adding and field renaming and validation hardcoded.

The other thing is that multicrud will probably change a lot before it leaves alpha status, and the API can not be considered stable yet. This should not stop you from toying around with it, but it should be kept in mind when adding it as a dependency.

That said, you can feel free to study the multicrud module, and copy some ideas, if that helps.

lolandese’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)
Related issues: +#2816955: Insert/delete columns

For D7 there is a patch at #2816955: Insert/delete columns.

Closing as "Won't fix" because the Drupal 6 version is unsupported.