techsharma2000 / jquery-datatables-editable

Automatically exported from code.google.com/p/jquery-datatables-editable
0 stars 0 forks source link

Inline inserts - adding new rows without a popup dialog box. #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to be able to add a new row to the table without a dialog box, 
just by navigating to a new row on the datatable (click an "add" button, or nav 
to the last row etc.) much like you would add a new row in excel or other 
desktop grids.

Original issue reported on code.google.com by otheracc...@zivan.com on 19 May 2011 at 7:07

GoogleCodeExporter commented 9 years ago
Hi,

I will see how hard it would be to add this in the next version. However I'm 
not sure is it feasible, because current table can edit existing records with 
existing ids. If I add automatically new record it must be added on the server 
side first and get the new id. This is possible only if there are no required 
fields in the record when the new one is created (this is rare case).

However I will try to add this feature too.

Regards,
Jovan

Original comment by joc...@gmail.com on 19 May 2011 at 8:03

GoogleCodeExporter commented 9 years ago
Jovan,

This turns out to be more complex than it initially seems.

Maybe it can be accomplished by adding a form in the table footer that just has 
the appearance of being a row in the table.

Or maybe a dummy key field can be generated in the table (maybe a negative 
number) that can then be overwritten after the call to the server side insert 
returns the database's new key id. 

Just some thoughts. Thanks for all your work on this so far. It is a much 
needed widget, and a great help!

Thanks!
Jon

Original comment by otheracc...@zivan.com on 20 May 2011 at 2:05

GoogleCodeExporter commented 9 years ago
Hi,

I have tied it but it si too complex. You can acomplish this behavoiur now if 
you set fnRowAdding() function as a parameter and manyally inject new row, 
apply editable and stop further add action. However I have no idea when cell 
content should be submitted (it would look odd if it is saved on blur of each 
cell).

Therefore I thinhk that this feature should not be included in the standard 
plugin.

However, thanks for idea.

Regards,
Jovan

Original comment by joc...@gmail.com on 28 May 2011 at 1:37

GoogleCodeExporter commented 9 years ago
This will not be included in the near future versions. Logic is to complex.

Original comment by joc...@gmail.com on 1 Jun 2011 at 5:00

GoogleCodeExporter commented 9 years ago
The plugin is still very useful anyway and much appreciated. Thanks for looking 
into this.

Original comment by otheracc...@zivan.com on 1 Jun 2011 at 5:38

GoogleCodeExporter commented 9 years ago
"Too complicated": The original datatables deluxe plugin "edit" support this 
behaviour.  Too bad that it costs > $100.

Original comment by daniel.g...@gmail.com on 12 Sep 2012 at 2:36