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*?
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
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
I think you will want to use
columns.orderSequence
.Kevin
Brilliant! Thank you, Kevin.
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