How to change the default order in a particular search pane ?
How to change the default order in a particular search pane ?
![MelodyNelson](https://secure.gravatar.com/avatar/621dc705365aa283355fb6b813f72a14/?default=https%3A%2F%2Fvanillicon.com%2F621dc705365aa283355fb6b813f72a14_200.png&rating=g&size=120)
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi,
I'm using SearchPanes like this :
searchPanes: {
columns: [15, 1, 2, 3, 13]
}
The column 15 of my table contains years and I would like to change the default order only in this pane. I want a descending order by default for the years.
I didn't find an option to do it (maybe I didn't see it...)
Thanks for your help
Replies
I believe you will want to use
columns.searchPanes.dtOpts
to set theorder
option the column 15 pane.Kevin
Thanks Kevin.
I'm not sure I'm doing the right thing.
I've tried the following code but all the panes disappear, only the links collapse, show and clear the panes are visible on the page.
That's close! Here's an example, take a look at the
age
column, that's similar to what you want. The SearchPanes only have two columns, so you're referring to column 0 - the column with the data.Colin
Thanks a lot Colin.
It's nice that I can put it in columnDefs, now it's ok with all these defs :