Problem fixing column width with bAutoWidth set to false
Problem fixing column width with bAutoWidth set to false
Hello!
I have a problem with my table. Even if bAutoWidth is set to false, when I start searching chars from the top-right box, columns start changing size.
what am I doing wrong???
This is my code:
[code]
$(document).ready(function() {
$('#content').html( '' );
$('#table').dataTable( {
"bJQueryUI": true,
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": false,
"aaData": [["Nome Secondo nome","Cognome","Societa","Reparto","Ufficio","Cellulare","Indirizzo posta elettronica"],
["AS ","V","test","test","","","test"],
["asFe ","TE","TEizi","ET","7579","+T76","T@.it"],
["AS ","V","test","tedfgst","","","test"]]
"aoColumns": [
{ "sTitle": "Nome", "sWidth": "15%" },
{ "sTitle": "Cognome", "sWidth": "15%" },
{ "sTitle": "Società ", "sWidth": "15%" },
{ "sTitle": "Reparto", "sWidth": "25%"},
{ "sTitle": "Fisso", "sWidth": "5%"},
{ "sTitle": "Mobile", "sWidth": "10%"},
{ "sTitle": "eMail", "sWidth": "15%"},
]
} );
} );
[/code]
This is my test-page
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Quix Contact
@import "css/datatables/jquery.dataTables_themeroller.css";
@import "css/ui-lightness/jquery-ui-1.10.2.custom.min.css";
@import "css/other_style.css";
[/code]
Where is the problem???
Thank you!
I have a problem with my table. Even if bAutoWidth is set to false, when I start searching chars from the top-right box, columns start changing size.
what am I doing wrong???
This is my code:
[code]
$(document).ready(function() {
$('#content').html( '' );
$('#table').dataTable( {
"bJQueryUI": true,
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": false,
"aaData": [["Nome Secondo nome","Cognome","Societa","Reparto","Ufficio","Cellulare","Indirizzo posta elettronica"],
["AS ","V","test","test","","","test"],
["asFe ","TE","TEizi","ET","7579","+T76","T@.it"],
["AS ","V","test","tedfgst","","","test"]]
"aoColumns": [
{ "sTitle": "Nome", "sWidth": "15%" },
{ "sTitle": "Cognome", "sWidth": "15%" },
{ "sTitle": "Società ", "sWidth": "15%" },
{ "sTitle": "Reparto", "sWidth": "25%"},
{ "sTitle": "Fisso", "sWidth": "5%"},
{ "sTitle": "Mobile", "sWidth": "10%"},
{ "sTitle": "eMail", "sWidth": "15%"},
]
} );
} );
[/code]
This is my test-page
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Quix Contact
@import "css/datatables/jquery.dataTables_themeroller.css";
@import "css/ui-lightness/jquery-ui-1.10.2.custom.min.css";
@import "css/other_style.css";
[/code]
Where is the problem???
Thank you!
This discussion has been closed.
Replies
[code]{ "sTitle": "Nome", "sWidth": "15%" }[/code]
has to be
[code]{ sTitle: "Nome", sWidth: "15%" }[/code]
?