columnDefs render function text input value when filtered
columnDefs render function text input value when filtered
rmichels
Posts: 3Questions: 3Answers: 0
I have a datatable that uses the render property for a column def. This renders a text input with a unique id. how do i get that text inputs value after it has been filtered out of the datatable?
This discussion has been closed.
Answers
Filtering does not affect the actual data set associated with the table whether it is filtered or not.
So you and access your data with something like $('#example').DataTable().rows().data() and time, then search the data array for the data you need.
If you are using
columns.render
to calculate a value, you need to usecells().render()
to get the rendered value, asrows().data()
will give the original data (which in this case would be the uncalculated value(s)).Allan