By xniu on
I want to create a table with editable cells so that user can copy data from spreadsheet and paste data into this table. There will be some buttons below the table: 'insert' which can insert all the rows in the table into database; 'add a row(s)' which can add one or more empty rows into this table; and 'delete' which can delete the selected rows from the table. Could someone tell me if it is doable? If so, would you please give me some clues? I am new to drupal. Thank you very much!
Comments
Anyone could help this?
I am still waiting for the help. Thanks!
That's hard.
What you really want is a datagrid element. Unfortunately, that's not currently supported in any browser that I know of, since it's still in working draft status.
There have been some attempts to use JavaScript to make datagrids out of tables:
http://dhtmlx.com/docs/products/dhtmlxGrid/
This one supports copying data FROM a grid, but not pasting INTO the grid.
http://www.codeproject.com/KB/scripting/Javascript_DataGrid.aspx
This one only works in IE, which is where I stopped reading.
It would be easier to do using a Java Applet, but then your users would have to have Java installed.
Basically, you have these options:
Good luck! You'll need it.
I gave up
Thank you very much! Now I know I have to give up and think of another way to do it.