Pass name of sorted column to server

Pass name of sorted column to server

KrivopalaKrivopala Posts: 1Questions: 1Answers: 0

Hi,
I need to create dataTable with serverSide: true. When I try to get the request on my endpoint on the server side, I get something like 0: {column: 5, dir: "asc"}. But I really want to get the name of the column, not the number of column that I sort by.
I will be really appreciated If you helped me with that.

Answers

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

    Yep, the server-side client just sends the column number, not the name, as you say. You can however add data to what's sent to the server with - ajax.data. You could add the names in there, which your server-side script would then be able to access.

    Colin

Sign In or Register to comment.