Force DataTable to wrap text

Force DataTable to wrap text

radi8radi8 Posts: 31Questions: 6Answers: 0
edited July 2017 in Free community support

I am trying to create a table layout detailing customer notes and other text entered into a textbox. I did not limit the user's ability to enter data, so some of this text is rather lengthy.

When I create a table with DataTables, it prevents the word wrap functionality, and even ignores \n\r. The resultant displayed width table is huge! All the text is on one line and the table cells are text width, This makes the table literally unreadable.

If I display the table without data tables, it displays as I would expect (wrapping the text within the cell), so the issue is in DataTables API/CSS somewhere (most likely CSS)

Is there a way to allow columns to display in a more compact manner and turn ON word wrap?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,310Questions: 26Answers: 4,948
    edited July 2017 Answer ✓

    You can try adding wrap to your table class. The Styling doc discusses the default Datatables styles.

    Kevin

This discussion has been closed.