fnGetPosition of bVisible:false cols
fnGetPosition of bVisible:false cols
Hi,
I would like to get the position of an element inside the datatables (id column), but this column isn't on the DOM since I'm hiding it to the user with bVisible: false property. The documentation states that fnGetPosition does:
"Get the array indexes of a particular cell from it's DOM element and column index including hidden columns."
But this is not working here with the hidden columns.
Thanks for your time.
I would like to get the position of an element inside the datatables (id column), but this column isn't on the DOM since I'm hiding it to the user with bVisible: false property. The documentation states that fnGetPosition does:
"Get the array indexes of a particular cell from it's DOM element and column index including hidden columns."
But this is not working here with the hidden columns.
Thanks for your time.
This discussion has been closed.
Replies
Allan
I am trying to get data from a hidden column (hidden with bVisible:false). I can access the hidden data since fnGetData method returns everything (hidden or not hidden) so this is not an issue.
The problem I have is that I also need to get the hidden column index with fnGetPosition, referencing it as a classname or a data attribute, but as you state, I don't have the node since isn't in the DOM when the column is set to hidden.
I wrote a workaround, cloning the complete 'th' row of the table before Datatables init and searching inside this clone to get the desired index, but there should be a cleaner way to do this.
Many thanks!