Sorting text input fields in column
Sorting text input fields in column
![sira](https://secure.gravatar.com/avatar/0ee733afc1782b1c292d59042af160b0/?default=https%3A%2F%2Fvanillicon.com%2F0ee733afc1782b1c292d59042af160b0_200.png&rating=g&size=120)
I want to have a table in which some cells are not just text but text input fields to change the content. How can I adjust the sorting function so that these cells are also sorted correctly in the column?
Thanks for any help!
This discussion has been closed.
Answers
You need to use dom-text sorting plug-in.
Include the appropriate file (
//cdn.datatables.net/plug-ins/1.10.15/sorting/custom-data-source/dom-text.js
). Then usecolumns.orderDataType
option and set it todom-text
.For example:
See more articles about jQuery DataTables on gyrocode.com.
Thank you, that worked!