fnDeleteRow Question/Problem

fnDeleteRow Question/Problem

denvildenvil Posts: 2Questions: 0Answers: 0
edited September 2012 in General
I am making my first attempt at using datatables. And I am simply trying to delete a row. The row is deleted but, the data elements in my browser appear duplicated. For example, another search box appears under my original search box.

Thanks for any help........

Here is my code to delete row 1

function DeleteSelectedPOS(){
$(document).ready(function() {
var oTable = $('#mainTable').dataTable();
oTable.fnDeleteRow(1,null,true);
} );


And my code to load datatables :

$(document).ready(function() {
doNotShow = false;
setUpCommonControls();
$("#divContent1").show();
document.getElementById("tableDiv").innerHTML = getPartNumberTable();
$('#mainTable').dataTable( {
"bSortClasses": false,
"aaSorting": [[ 2, "asc" ]],
"aoColumns": [
{"sWidth" : "10px"},
{"sWidth" : "125px"},
{"sWidth" : "75px"},
{"sWidth" : "50px"},
{"sWidth" : "50px"},
{"sWidth" : "45px"},
{"sWidth" : "75px"}
],
iDisplayLength:3000
} );
});

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Think we would need a link to the page to be able to offer any help with this one. My guess is that you are overwriting the HTML for the table somewhere.

    Allan
This discussion has been closed.