jquery-datatables-editable - How to add a new row without the overlay?
jquery-datatables-editable - How to add a new row without the overlay?
Hello,
I am using the jquery-datatables-editable plugin and have my table mostly working, except that I am trying to add a new row without using the overlay that pops up. All I need to do is add a new row to the table (but not to the database) that the user can edit. Once the user edits any of the data, then it will need to save to the database. I already have this configured for existing rows, but haven’t figured out how to add a new row without using the overlay. Any thoughts on how to just simply add a new row?
Thanks,
Sean
I am using the jquery-datatables-editable plugin and have my table mostly working, except that I am trying to add a new row without using the overlay that pops up. All I need to do is add a new row to the table (but not to the database) that the user can edit. Once the user edits any of the data, then it will need to save to the database. I already have this configured for existing rows, but haven’t figured out how to add a new row without using the overlay. Any thoughts on how to just simply add a new row?
Thanks,
Sean
This discussion has been closed.
Replies
[code]
$(document).ready(function() {
$('#time_editor').dataTable({
'bProcessing': true,
'bServerSide': true,
'sAjaxSource': '/RedApple_SchoolAdmin/TimesheetController'
}).makeEditable({
"sUpdateURL": '/RedApple_SchoolAdmin/UpdateTimesheet',
"aoColumns": [
null,
<% for (int i = 0; i < colCount; i++) {%>
{
indicator: 'Saving time punch',
tooltip: '',
type: 'text',
onblur: 'cancel',
submit: 'Save'
},
{
indicator: 'Saving department change',
tooltip: '',
type: 'select',
onblur: 'cancel',
submit: 'Save',
data: "<%= outputDepartments.toString()%>"
},
<%}%>
]});
});
[/code]
The output already looks like this and saves with existing data
[code]
+----------------+
| | 3/2 | 3/3 |
+----------------+
| In | 8:30 AM| 8:30 |
+----------------+
| Repeat next line... |
+----------------+
[/code]
All I need to do is manually insert a row into the html table.
Thanks,
Sean
That plugin is more up my ally.