fnAdjustColumnSizing doesn't work after ajax processing
fnAdjustColumnSizing doesn't work after ajax processing
Hi guy,
I'm currently doing something like this to get some data and display it in a datatables :
[code]
oTable = $('.datatable').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "200%",
"bScrollCollapse": true,
"bDestroy" : true,
"sAjaxSource": "xhr.php",
"bFilter": false,
"bSort": false,
"bLengthChange": false,
"bPaginate": false,
"bInfo": false,
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": "webservice.php",
"data": 'id=' + quotation_id + '&customer_id=' + id + '&action=true',
"success": function(msg){
fnCallback(msg);
}
});
},
"fnInitComplete": function() {
this.fnAdjustColumnSizing();
}
});
[/code]
But the fnAdjustColumnSizing won't work, if I use it on a click element or something else it work fine.
Any idea to solve this and make it work after the ajax processing ?
I'm currently doing something like this to get some data and display it in a datatables :
[code]
oTable = $('.datatable').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "200%",
"bScrollCollapse": true,
"bDestroy" : true,
"sAjaxSource": "xhr.php",
"bFilter": false,
"bSort": false,
"bLengthChange": false,
"bPaginate": false,
"bInfo": false,
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": "webservice.php",
"data": 'id=' + quotation_id + '&customer_id=' + id + '&action=true',
"success": function(msg){
fnCallback(msg);
}
});
},
"fnInitComplete": function() {
this.fnAdjustColumnSizing();
}
});
[/code]
But the fnAdjustColumnSizing won't work, if I use it on a click element or something else it work fine.
Any idea to solve this and make it work after the ajax processing ?
This discussion has been closed.
Replies
Allan
To complete the form, you can put this data :
- click one of the radio
- bob
- test
- 18/04/1990
- 0630700614
- blabla@awea.fr
- click 'non'
- 0
- 13005
- 95 rue du test
- 12/01/2012
- 550
Thanks for your help -)
[code]
"sScrollXInner": "200%",
[/code]
There is a misalignment in the columns and I suspect that is the problem. If that doesn't do it, let me know and I'll see if I can create a local version that I can experiment with.
Allan