Is it possible to set the order that a column is sorted *on first click*?

Is it possible to set the order that a column is sorted *on first click*?

cclarkcclark Posts: 7Questions: 3Answers: 0

I'm happy with the initial order of my table when it renders. I have columns containing "T" and "F" values that represent true and false. When the user first clicks the header of one of these columns, it sorts in alphabetical order, and thus the false values appear before the true values. Is it possible to set it to sort in descending order on first click, so that the true values appear at the top (meaning that the user would click a second time to get the false values at the top)?

Thanks in advance

This question has an accepted answers - jump to answer

Answers

  • cclarkcclark Posts: 7Questions: 3Answers: 0

    PS. btw, just curious...

    In this forum, the message titles are truncated. For instance, for my question, I can only see the title, "Is it possible to set the o..." instead of the full title, "Is it possible to set the order that a column is sorted on first click?". I find this forum very difficult to use for this reason. Is there any way to see the full titles by default? If I'm doing something wrong, please explain. Thanks

  • kthorngrenkthorngren Posts: 21,374Questions: 26Answers: 4,957
    Answer ✓

    I think you will want to use columns.orderSequence.

    Kevin

  • cclarkcclark Posts: 7Questions: 3Answers: 0

    Brilliant! Thank you, Kevin.

  • allanallan Posts: 63,572Questions: 1Answers: 10,482 Site admin

    I find this forum very difficult to use for this reason. Is there any way to see the full titles by default?

    Part of the reason I've done that is that titles were being posted which were really long - I'd prefer the title to be something short "Default sort order" for example, and then the actual question get posed in the post body. The title isn't really where the question should be.

    I have been meaning to get around to setting a "title" attribute for the tag so it would be possible to hover over it and see the full title. I've just never got around to it.

    Allan

Sign In or Register to comment.