fnDeleteRow deletes another row
fnDeleteRow deletes another row
I am using the example of drilldown row (http://www.datatables.net/blog/Drill-down_rows) to build a action bar that has different actions like delete, edit etc.
http://pastebin.com/wE8NabjV
The delete button here deletes other row. I know its something to do with the parent I am defining, but not being bale to get the correct parent deleted.
http://pastebin.com/wE8NabjV
The delete button here deletes other row. I know its something to do with the parent I am defining, but not being bale to get the correct parent deleted.
This discussion has been closed.
Replies
[code]
/* Add a click handler for the delete row */
$('#managePolicyTable button.delete').live('click',function(e) {
e.preventDefault();
oTable.fnDeleteRow( anOpen.pop());
} );
$('#managePolicyTable td.control').live( 'click', function () {
var nTr = this.parentNode;
var i = $.inArray( nTr, anOpen );
if ( i === -1 ) {
var nDetailsRow = oTable.fnOpen( nTr, fnFormatDetails(), 'details' );
$('div.innerDetails', nDetailsRow).slideDown();
oTable.fnClose(anOpen.pop());
anOpen.push( nTr );
}
else {
$('div.innerDetails', $(nTr).next()[0]).slideUp( function () {
oTable.fnClose( nTr );
anOpen.splice( i, 1 );
});
}
} );
[/code]