≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
Maintaining Sorting
Maintaining Sorting
fresler
Posts: 7
Questions: 2
Answers: 0
March 2012
edited March 2012
in
General
Is there a way to capture which column the user clicked on for sorting and it's direction?
Replies
allan
Posts: 65,846
Questions: 1
Answers: 10,956
Site admin
April 2012
You can use one of:
1. Add a click listener in the header and read fnSettings().aaSorting
2. Listen for the 'sort' event and use
aaSorting
from the settings object
3. Use an
fnDrawCallback
function and check the
aaSorting
param from the settings object - which will occur on each draw.
Allan
fresler
Posts: 7
Questions: 2
Answers: 0
April 2012
edited April 2012
The
fnDrawCallback
and
aaSorting
method worked great. Thanks!
This discussion has been closed.
Replies
1. Add a click listener in the header and read fnSettings().aaSorting
2. Listen for the 'sort' event and use aaSorting from the settings object
3. Use an fnDrawCallback function and check the aaSorting param from the settings object - which will occur on each draw.
Allan