table.columns.adjust().draw() -> call the backend

table.columns.adjust().draw() -> call the backend

RaffaCubeRaffaCube Posts: 3Questions: 2Answers: 0

Hi, my datatable is connected to a backend method.
when the page size is changed to adjust the table columns I use the command:
table.columns.adjust().draw(false)

However, even in this case the backend is called which uses complicated queries that take a bit of time.
Is it possible to use the columns.adjust() command without calling the backend?
Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Answer ✓

    I'm assuming you have server-side processing enabled here.

    columns.adjust() won't call the backend itself, but the draw() call will (again, assuming you are using server-side processing).

    Remove the .draw(false). A draw isn't needed for column realignment.

    Allan

  • RaffaCubeRaffaCube Posts: 3Questions: 2Answers: 0

    Perfect!!!
    Thank you

Sign In or Register to comment.