Responsive plugin with serverside processing
Responsive plugin with serverside processing
Hello,
I have problems with my columns width on table which im loading dynamically with ajax data.
At first init everything looks fine, table is responsive, but if i click on header to sort column, and loaded data has higher width then the one before, table stretches out of div and instead of beeing responsive, scroll appears (since its overflow).
What can i do to tell table to fit div instead of overflow?
ive set table td { white-space: normal } but it doesnt help much, also swidth doesnt seem to be working
Answers
Hi Velja,
perhaps one or both of these lines could help after ajax successfully returned:
$('#thetableid').dataTable().fnAdjustColumnSizing();
and/or
$($.fn.dataTable.tables(true)).DataTable().responsive.recalc();
Hey, thanks for response,
i've tried them both in drawCallback, but without success
This can be a bug with Responsive.
I`ve posted another question about responsive overflow.
Seems this behaviour has the same reasons.
https://datatables.net/forums/discussion/25390/datatables-responsive-with-bootstrap-not-collapsing-columns-at-the-correct-point#latest