The last column header is aligned vertically top
The last column header is aligned vertically top
pankaj
Posts: 4Questions: 0Answers: 0
Hi,
I have a datatable which i m populating from json file. My problem is that the last column header text is aligned vertically top (Also the height of header column is becoming double).
Does anyone have the solution for this.
This is my datatable code.
[code]$(document).ready(function() {
var oTable = $('#genericTable').dataTable( {
"bProcessing": true,
"sAjaxSource": "../jsonData/resources/json/" + key + ".json",
"sPaginationType" : "full_numbers",
"bJQueryUI" : true,
"bRetrieve" : true,
"bPaginate" : true,
"bSort" : true,
"aaSorting" : [[ 3, "desc" ]],
"iDisplayLength" : 50,
"bAutoWidth" : false,
"aoColumns": [
{ "sTitle": "Name" },
{ "sTitle": "Description" },
{ "sTitle": "Date" },
{ "sTitle": "Action" }
],
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if(typeof aData[0] != 'string'){
$('td:eq(0)', nRow).html( '' +
aData[0]['displayValue'] + '');
}
$('td:eq(3)', nRow).html( '' +
aData[3]['displayValue'] + '');
}
}).columnFilter({ sPlaceHolder: "head:after",
aoColumns: [ { type: "text" },
{ type: "text" },
null
]
});
});[/code]
Thanks in advance!
I have a datatable which i m populating from json file. My problem is that the last column header text is aligned vertically top (Also the height of header column is becoming double).
Does anyone have the solution for this.
This is my datatable code.
[code]$(document).ready(function() {
var oTable = $('#genericTable').dataTable( {
"bProcessing": true,
"sAjaxSource": "../jsonData/resources/json/" + key + ".json",
"sPaginationType" : "full_numbers",
"bJQueryUI" : true,
"bRetrieve" : true,
"bPaginate" : true,
"bSort" : true,
"aaSorting" : [[ 3, "desc" ]],
"iDisplayLength" : 50,
"bAutoWidth" : false,
"aoColumns": [
{ "sTitle": "Name" },
{ "sTitle": "Description" },
{ "sTitle": "Date" },
{ "sTitle": "Action" }
],
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if(typeof aData[0] != 'string'){
$('td:eq(0)', nRow).html( '' +
aData[0]['displayValue'] + '');
}
$('td:eq(3)', nRow).html( '' +
aData[3]['displayValue'] + '');
}
}).columnFilter({ sPlaceHolder: "head:after",
aoColumns: [ { type: "text" },
{ type: "text" },
null
]
});
});[/code]
Thanks in advance!
This discussion has been closed.