1

I am using jquery datatable, I want avoid a column while sorting other columns, that is that column should remain static.

3
  • Can you give an example of the result of this sort? Commented Mar 8, 2016 at 11:20
  • I hope this might help. stackoverflow.com/a/4672946/4672534 Commented Mar 8, 2016 at 11:25
  • @rmondesilva this is for disable sorting a particular column, while sorting other columns it will affect. My requirement is that column should not be change, i should remain same Commented Mar 8, 2016 at 11:28

1 Answer 1

0

Use "orderFixed". Read https://datatables.net/reference/option/orderFixed

"orderFixed": [ column index, sort ];

$('#tbl').DataTable({
                "orderFixed": [ 0, 'asc' ]
          });
Sign up to request clarification or add additional context in comments.

2 Comments

it is not working. while sorting other columns the value inside fixed column also affected
It works on mine. I think it's better if you will also post your codes. So we can see the problem clearly why it does not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.