fnDeleteRow Question/Problem
fnDeleteRow Question/Problem
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
} );
});
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
} );
});
This discussion has been closed.
Replies
Allan