It shows many "showing 1 to 3 entries" "showing 1 to 11 entries" .... bInfo bar after I close popup form page and refresh datatable.
anyone can give me a hand?
step1:call "loadInstockDetails" method refresh sub datatable- show:showing 1 to 3 entries
step2:popup jquery dialog
step3:close jquery dialog using "window.parent.$('.ui-icon-closethick').trigger('click');"
step4:call "loadInstockDetails" method refresh sub datatable- show:showing 1 to 3 entries showing 1 to 11 entries. Old bInfo bar "showing 1 to 3 entries" still was there.
Replies
Certainly. Please link to a test case showing the issue so I can help.
Allan
step2:popup jquery dialog
step3:close jquery dialog using "window.parent.$('.ui-icon-closethick').trigger('click');"
step4:call "loadInstockDetails" method refresh sub datatable- show:showing 1 to 3 entries showing 1 to 11 entries. Old bInfo bar "showing 1 to 3 entries" still was there.
Following is the code:
sTable=$('#sTable').dataTable({
"bDestroy": true,"bPaginate": false,
"bAutoWidth": false,"bFilter": false,
"bSort": false,"bDeferRender":true,
"sAjaxSource": 'loadInstockDetails.htm?isid='+isid,
"sAjaxDataProp": "instock.instockdetails",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
/* Init Instock General information */
$("#disdate").html(json.instock.isdate);
if(json.instock.supplier!=null) $("#dsupplier").html(json.instock.supplier.name);
else $("#dsupplier").html("");
$("#dpsno").html(json.instock.psno);
$("#dquantity").html(json.instock.quantity);
$("#ddeliverPerson").html(json.instock.deliverPerson);
$("#dplateNo").html(json.instock.plateNo);
$("#ddescription").html(json.instock.description);
$("#dmemo").html(json.instock.memo);
fnCallback(json);
});
},
"aoColumns": [
{ "mData": "isdid","sTitle":"isdid","bVisible": false},
{ "mData": "product.name","sTitle":"", "sDefaultContent":"","sWidth": "25%"},
{ "mData": "quantity","sTitle":"", "sWidth": "8%", "sClass": "alignRight" },
{ "mData": "skidNo","sTitle":"", "sWidth": "8%" },
{ "mData": "description","sTitle":"", "sWidth": "35%" },
{ "mData": "valuelist.propertyName","sTitle":"","sDefaultContent":"", "sWidth": "8%" },
] ,
"fnDrawCallback": function ( oSettings ) {
$('#sTable tbody tr').each( function () {
$(this).click(function () {
if ( $(this).hasClass('row_selected')!=true ) {
$(this).addClass('row_selected').siblings().removeClass('row_selected');
}
});
});
}
});
"bDestroy": true,"bPaginate": false,
"bAutoWidth": false,"bFilter": false,
"bSort": false,"bDeferRender":true,
"sAjaxSource": 'loadInstockDetails.htm?isid='+isid,
"sAjaxDataProp": "instock.instockdetails",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
/* Init Instock General information */
$("#disdate").html(json.instock.isdate);
if(json.instock.supplier!=null) $("#dsupplier").html(json.instock.supplier.name);
else $("#dsupplier").html("");
$("#dpsno").html(json.instock.psno);
$("#dquantity").html(json.instock.quantity);
$("#ddeliverPerson").html(json.instock.deliverPerson);
$("#dplateNo").html(json.instock.plateNo);
$("#ddescription").html(json.instock.description);
$("#dmemo").html(json.instock.memo);
fnCallback(json);
});
},
"aoColumns": [
{ "mData": "isdid","sTitle":"isdid","bVisible": false},
{ "mData": "product.name","sTitle":"", "sDefaultContent":"","sWidth": "25%"},
{ "mData": "quantity","sTitle":"", "sWidth": "8%", "sClass": "alignRight" },
{ "mData": "skidNo","sTitle":"", "sWidth": "8%" },
{ "mData": "description","sTitle":"", "sWidth": "35%" },
{ "mData": "valuelist.propertyName","sTitle":"","sDefaultContent":"", "sWidth": "8%" },
] ,
"fnDrawCallback": function ( oSettings ) {
$('#sTable tbody tr').each( function () {
$(this).click(function () {
if ( $(this).hasClass('row_selected')!=true ) {
$(this).addClass('row_selected').siblings().removeClass('row_selected');
}
});
});
}
}); [/code]
step2:popup jquery dialog
step3:close jquery dialog using "window.parent.$('.ui-icon-closethick').trigger('click');"
step4:call "loadInstockDetails" method refresh sub datatable- show:showing 1 to 3 entries showing and lost one header title.
[code]sTable = $('#sTable').dataTable({
"bDestroy": true,"bPaginate": false,
"bAutoWidth": false,"bFilter": false,
"bSort": false,"bInfo": true,
"sAjaxSource": 'loadInstockDetails.htm?isid='+isid,
"sAjaxDataProp": "instock.instockdetails",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
/* Init Instock General information */
$("#disdate").html(json.instock.isdate);
if(json.instock.supplier!=null) $("#dsupplier").html(json.instock.supplier.name);
else $("#dsupplier").html("");
$("#dpsno").html(json.instock.psno);
$("#dquantity").html(json.instock.quantity);
$("#ddeliverPerson").html(json.instock.deliverPerson);
$("#dplateNo").html(json.instock.plateNo);
$("#ddescription").html(json.instock.description);
$("#dmemo").html(json.instock.memo);
fnCallback(json);
});
},
"aoColumns": [
{ "mData": "isdid","sTitle":"isdid","bVisible": false},
{ "mData": "product.name","sTitle":"", "sDefaultContent":"","sWidth": "25%"},
{ "mData": "quantity","sTitle":"", "sWidth": "8%", "sClass": "alignRight" },
{ "mData": "skidNo","sTitle":"", "sWidth": "8%" },
{ "mData": "description","sTitle":"", "sWidth": "35%" },
{ "mData": "valuelist.propertyName","sTitle":"","sDefaultContent":"", "sWidth": "8%" },
] ,
"fnDrawCallback": function ( oSettings ) {
$('#sTable tbody tr').each( function () {
$(this).click(function () {
if ( $(this).hasClass('row_selected')!=true ) {
$(this).addClass('row_selected').siblings().removeClass('row_selected');
}
});
});
}
});[/code]
Allan