if you click some button,then change the datatables the displaylenght,you can try this :
$('.something').click( function () {
var oSettings = oTable.fnSettings();
oSettings._iDisplayLength = 50;
oTable.fnDraw();
});
oTable = $('#example').dataTable();