Wrong dataTable creation, this may be a bug
Wrong dataTable creation, this may be a bug
ecil
Posts: 2Questions: 0Answers: 0
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?
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?
This discussion has been closed.
Replies
[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]