Accessing raw filter data

Accessing raw filter data

daniel_rdaniel_r Posts: 460Questions: 4Answers: 67
edited February 2017 in Free community support

Hi,

Sorry In case I already asked this before but I wondered how can I access raw column data when working with filtered data with the following/other? api table.rows({filter: 'applied'}) , the data that I'm after is something like the _aFilterData (legacy?) .

In other words, I'm looking for a way to access the columns -> render output that is being displayed in the table

I have the following test case , when I set in cumulative_filtering: true in yadcf I'm using the table.rows({filter: 'applied'}).data().toArray(); api which does not provide me the columns -> render output, but if I set cumulative_filtering: false I use the settingsDt.aoData which does provide me the needed data (but that data can't be used because its not the filtered one,

Thanks ahead.

Answers

  • allanallan Posts: 63,852Questions: 1Answers: 10,519 Site admin

    You can use the cells().render() method to get the orthogonal search data. We need to be a little careful with the term "raw" since the orthogonal data means that the developer can optionally modify the original source data (what I would call the raw data) into something else that can be used for searching. For example, consider the postcode "KY11 8UU". You might want to allow searching on it without the space, so you could return both forms to allow string matching.

    There is the cells().cache() method, but I'd suggest using the render one instead since the cache isn't always going to be available when you might want it (it is only populated when DataTables actually needs it).

    Allan

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    Thanks allan, will try to use it

This discussion has been closed.