Wrong dataTable creation, this may be a bug

Wrong dataTable creation, this may be a bug

ecilecil Posts: 2Questions: 0Answers: 0
edited August 2013 in Bug reports
Hi,
I have ajax based pagination and I have use different datatable with different settings and variable names, when I change page and create datatable, it'll be different features.

For example: One table has bFilter:false and second table has bFilter:true, but there is no search filter box in second table.

How Do I solve this?

Replies

  • allanallan Posts: 63,386Questions: 1Answers: 10,449 Site admin
    Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
  • ecilecil Posts: 2Questions: 0Answers: 0
    my Second table's code is below:

    [code]
    var videoListDataTable = videoListTable.dataTable({
    "bProcessing": true,
    "bServerSide": true,
    "bFilter": true, "bRetrieve": true,
    <?php if (isset($forRelation)): ?>
    "bLengthChange": false,
    "bInfo": false,
    <?php endif; ?>
    "sAjaxSource": "video/tableData",
    "oLanguage": BIP.dataTableLocalization,
    "fnServerData": function (sSource, aoData, fnCallback, oSettings) {
    oSettings.jqXHR = $.ajax({
    "dataType": 'json',
    "type": "POST",
    "url": sSource,
    "data": aoData,
    "success": fnCallback
    });
    },
    "aoColumns": [
    {"sTitle": "Id", "mData": "id", "bSortable": false},
    {"sTitle": "Video Başlığı", "mData": "title", "bSortable": false},
    {"sTitle": "Açıklama", "mData": "description", "bSortable": false},
    {"sTitle": "Thumbnail", "mData": "cdn_thumbnail", "bSortable": false,"fnRender":function(obj){
    // debugger;
    var sReturn = obj.aData["cdn_thumbnail"]
    var returnButton = "";
    return returnButton;
    }},
    {
    "sTitle": "Seçim",
    "sClass": "text-centered",
    "mData": null,
    "bSortable": false,
    "fnRender": function (obj) {
    var sReturn = obj.aData[ obj.iDataColumn ];
    var returnButton = "";
    return returnButton;
    },"sWidth": "25%"
    },
    {
    "sTitle": "Düzenle",
    "sClass": "text-centered",
    "mData": null,
    "bSortable": false,
    "fnRender": function (obj) {
    var sReturn = obj.aData[ obj.iDataColumn ];
    var returnButton = "";
    return returnButton;
    },"sWidth": "25%"
    }
    ],
    "fnCreatedRow": function( nRow, aData, iDataIndex ) {
    $(nRow).attr("id","video_table_video_id_"+aData["id"]);
    }
    });
    [/code]
This discussion has been closed.