Ajax source and aaData initialisation parameter - width of columns different after second call
Ajax source and aaData initialisation parameter - width of columns different after second call
As the title says, I'm using an Ajax call to get new data for my tables and using the aaData initialization parameter. The calls all work correctly and repopulate the tables with the correct data. The problem that I have is that although the first table is drawn correctly, all subsequent calls don't auto-size the column widths to fill the entire width of the table - instead, the columns are only as wide as their data.
I'm calling DataTables like so:
[code]
$(document).ready(function(){
$('#applyFilter').click(function(){
//set up vars for ajax options and aoColumns
$.get('myAjaxsource', options, function(response){
$('#grid-container').dataTable({
'aaData': response.AADATA,
"aoColumns": aoColumns,
"bJQueryUI": true,
"bDestroy": true
});
});
});
}
[/code]
Note: the aoColumns object does not include explicit widths. Also, I've tried removing the bJQueryUI parameter.
I'm calling DataTables like so:
[code]
$(document).ready(function(){
$('#applyFilter').click(function(){
//set up vars for ajax options and aoColumns
$.get('myAjaxsource', options, function(response){
$('#grid-container').dataTable({
'aaData': response.AADATA,
"aoColumns": aoColumns,
"bJQueryUI": true,
"bDestroy": true
});
});
});
}
[/code]
Note: the aoColumns object does not include explicit widths. Also, I've tried removing the bJQueryUI parameter.
This discussion has been closed.
Replies
Can you post a link to your example so we can see what is happening in action please?
Allan