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: 653Questions: 0Answers: 102

    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: 45,699Questions: 1Answers: 6,272 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

Sign In or Register to comment.