column width set to zero
column width set to zero
Hi,
here is my init
[code]
misc_space_type_list_table=$('#misc_space_type_list').dataTable(
{
/* "aoColumns": [
null,
null,
null,
null,
null
],*/
"aoColumnDefs": [
{ "sWidth": "20%", "aTargets": "_all" }
],
"bAutoWidth": false,
"bFilter": false,
"bSort": false,
"sScrollX": "100%",
"sScrollY": 400,
"bProcessing": false,
// "bServerSide": true,
"sAjaxSource": 'get_space_type_list.php?action=0'
}
);
[/code]
I use aoColumnDefs to divide the columns to exactly the same width (5 colums). But the rendered table is far from being 20% of the table width=800px. Firebug shows that each column has a zero width
please see here
http://www.flickr.com/photos/37485943@N05/4861145613/
Im using the latest version
thanks
Florante
here is my init
[code]
misc_space_type_list_table=$('#misc_space_type_list').dataTable(
{
/* "aoColumns": [
null,
null,
null,
null,
null
],*/
"aoColumnDefs": [
{ "sWidth": "20%", "aTargets": "_all" }
],
"bAutoWidth": false,
"bFilter": false,
"bSort": false,
"sScrollX": "100%",
"sScrollY": 400,
"bProcessing": false,
// "bServerSide": true,
"sAjaxSource": 'get_space_type_list.php?action=0'
}
);
[/code]
I use aoColumnDefs to divide the columns to exactly the same width (5 colums). But the rendered table is far from being 20% of the table width=800px. Firebug shows that each column has a zero width
please see here
http://www.flickr.com/photos/37485943@N05/4861145613/
Im using the latest version
thanks
Florante
This discussion has been closed.
Replies
I'm going to guess that you have the table hidden when it is initialised - which is why the widths are all found to be 0. What to do to overcome this is call the fnAdjustColumnSizing API function ( http://datatables.net/api#fnAdjustColumnSizing ) when the table becomes visible.
Regards,
Allan