How to add column resizing functionality?

How to add column resizing functionality?

jstuardojstuardo Posts: 104Questions: 41Answers: 0

Hello,

DataTable lacks of a necessary feature. It is column resizing. By using plugin from http://www.bacubacu.com/colresizable it is useless since when DataTable is rendered, 2 tables are actually created, specially when scrollX parameter is true. One for the header and one for the body, so, that plugin makes the table to be unformatted.

Is there a way to accomplish this in DataTable?

Regards
Jaime

Answers

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    Hi Jamie,

    Sorry no - at the moment there is no way to do user adjustable column resizing in DataTables.

    Allan

  • michaelcpmichaelcp Posts: 17Questions: 2Answers: 0

    So ... Just to clarify, the column resize by drag and drop is not supported in Datatables by default and we have to add a plugin of sorts ?

    Thank you

  • jstuardojstuardo Posts: 104Questions: 41Answers: 0

    @arcanisgk in fact that is a very basic example. That works only for a basic table, however, when using, for example, scrollX property, DataTable causes 2 tables to be rendered. One for the header and the other for the body. In such a case, that plugin does not work.

    Regards
    Jaime

  • arcanisgkarcanisgk Posts: 41Questions: 12Answers: 0

    and if you turn off Scroll Property, on the event drag the column to resize ; and enable it when finally Resize event end ? i not mean in run this two event at same time, i think that you need work around it, to avoid this problem feature...

  • michaelcpmichaelcp Posts: 17Questions: 2Answers: 0

    So... guys ... what would you suggest on using ?

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Just to clarify, the column resize by drag and drop is not supported in Datatables by default and we have to add a plugin of sorts ?

    Yep, exactly. It's not part of the DataTables product, so you would need to use third-party extensions if they're available.

    Colin

  • michaelcpmichaelcp Posts: 17Questions: 2Answers: 0

    Thank you everyone for the comments. Do you guys have a plugin that you would suggest using ?

    Thank you

This discussion has been closed.