does DataTables allow this?

does DataTables allow this?

karawynnkarawynn Posts: 1Questions: 0Answers: 0
edited September 2009 in General
I need to create a table with unidirectional sorting.

That is, clicking a column header will put that column in ascending order, and clicking a second time will do nothing. Descending sorting would be disabled.

I don't see any options in DataTables that allow this restriction, but I thought I'd ask just in case I missed something ...

thanks!

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    Hi karawynn,

    Interesting question - I like it! This isn't possible in DataTables at the moment (although it could be hacked into the core quite quickly if you want to give it a go - have a look at the internal function "fnInnerSorting()" and you'll see a few places where the code could be modified to do what you are looking for.

    I will be looking at how to improve the sorting options that DataTables provides in the near future (see http://datatables.net/forums/comments.php?DiscussionID=596 for more information), so I'll bare this in mind to see if it would be suitable to provide this as part of the new framework.

    Regards,
    Allan
This discussion has been closed.