columnDefs render function text input value when filtered

columnDefs render function text input value when filtered

rmichelsrmichels 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?

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    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.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    If you are using columns.render to calculate a value, you need to use cells().render() to get the rendered value, as rows().data() will give the original data (which in this case would be the uncalculated value(s)).

    Allan

This discussion has been closed.