Is it possible to allow the user to adjust column widths?

Is it possible to allow the user to adjust column widths?

MikeZ**MikeZ** Posts: 9Questions: 2Answers: 0

Is it possible to allow the user to adjust column widths? I've scanned through the online examples, but it seems that the column widths are always set by DataTables, and are not adjustable by the end user. I ask because I want to use DataTables.Net to replace my antiquated ComponentArt:Grid controls, many of which have quite a lot of columns, often with quite wide data. In this situation ComponentArt Grids will truncate the data shown with an ellipsis ("..."), but allow the user to then adjust the column width if they want to see all the text for that column.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,376Questions: 26Answers: 4,957
    Answer ✓

    There is nothing built into Datatables to allow the user to resize the columns. A third party developer created a plugin called colResize which you can try. You will find posts on this forum with issues regarding its use but all issues need to go to the developer of the library.

    Some alternatives might be:

    1. Use the ellipsis plugin to allow the user to hover the data they want expanded.
    2. Use Child Rows Details to show the full data.
    3. Use column visibility with one showing ellipsis and the other the full data. Toggle the hidden state between the two so only one shows. Create your own button, as an example, that can toggle the visibility using column().visible(). Or use the ColVis button. Here are some examples.

    Kevin

Sign In or Register to comment.