editable table + add and delete row (addons)
editable table + add and delete row (addons)
emelianenko
Posts: 18Questions: 0Answers: 0
Hello everyone
in the section APIs from the examples, there are case studies for editable tables using a plugin for that, and there are other examples for adding row and also for deleting. The fact is that I need all those 3 things in one table but I am confused as to how I have to add the code there for all that.
For example, this
[code]/* Global var for counter */
var giCount = 1;
$(document).ready(function() {
$('#example').dataTable();
} );
function fnClickAddRow() {
$('#example').dataTable().fnAddData( [
giCount+".1",
giCount+".2",
giCount+".3",
giCount+".4" ] );
giCount++;
}
[/code]
adds a new row, then, where would the deleting row code go? (I cant find it by the way, but I believe to have seen it before) would I have to start another block for $('#example').dataTable(); and the initialisation code for editing rows would again start another instance of $('#example').dataTable();?
thanks a lot
in the section APIs from the examples, there are case studies for editable tables using a plugin for that, and there are other examples for adding row and also for deleting. The fact is that I need all those 3 things in one table but I am confused as to how I have to add the code there for all that.
For example, this
[code]/* Global var for counter */
var giCount = 1;
$(document).ready(function() {
$('#example').dataTable();
} );
function fnClickAddRow() {
$('#example').dataTable().fnAddData( [
giCount+".1",
giCount+".2",
giCount+".3",
giCount+".4" ] );
giCount++;
}
[/code]
adds a new row, then, where would the deleting row code go? (I cant find it by the way, but I believe to have seen it before) would I have to start another block for $('#example').dataTable(); and the initialisation code for editing rows would again start another instance of $('#example').dataTable();?
thanks a lot
This discussion has been closed.
Replies
For the editable part, you might be interested in this discussion: http://datatables.net/forums/comments.php?DiscussionID=1288 .
Allan