something wrong about binfo

something wrong about binfo

andyyunandyyun Posts: 8Questions: 0Answers: 0
edited March 2014 in General
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?

thanks.

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    > anyone can give me a hand?

    Certainly. Please link to a test case showing the issue so I can help.

    Allan
  • andyyunandyyun Posts: 8Questions: 0Answers: 0
    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.

    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');
    }
    });
    });
    }
    });
  • andyyunandyyun Posts: 8Questions: 0Answers: 0
    [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');
    }
    });
    });
    }
    }); [/code]
  • andyyunandyyun Posts: 8Questions: 0Answers: 0
    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 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]
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Can you please link to a test case, not just dump the code. Use JSFiddle or http://live.datatables.net .

    Allan
This discussion has been closed.