How to order by a string?
How to order by a string?

I have the column: STATE
STATE could assume this values : ACTIVE, AFK, BUSY, OFF.
I want to order([]) for STATE = 'ACTIVE'
Is it possible?
This discussion has been closed.
I have the column: STATE
STATE could assume this values : ACTIVE, AFK, BUSY, OFF.
I want to order([]) for STATE = 'ACTIVE'
Is it possible?
Answers
Datatables will order by the values in the column. Are you asking how to set the
order
option? You would use something likeorder: [[2, 'asc']]
where2
is theSTATE
column number. The column numbers start at 0 so2
would be the thrid column.Kevin
If you want specific ordering on that type, you can either create an ordering plug-in, examples here and here, or use
columns.render