Getting filtered rows when using scroller plugin
Getting filtered rows when using scroller plugin
gqmulligan
Posts: 1Questions: 0Answers: 0
Hi all,
I am trying to get the FULL filtered result set from data tables but am unable to find a good way to do this. I saw many other questions asking how to do something similar and the common answer was to use table._('tr', {"filter":"applied"}); however this will not work in my case because not all table rows have been created since I am using the scroller plugin.
The only way I could currently come up with was to bind to the filter callback on the table and use the aiDisplay array from the settings object so I can get the indexes of the filtered data.
Does anyone else know of a better solution?
Thanks for any suggestions.
I am trying to get the FULL filtered result set from data tables but am unable to find a good way to do this. I saw many other questions asking how to do something similar and the common answer was to use table._('tr', {"filter":"applied"}); however this will not work in my case because not all table rows have been created since I am using the scroller plugin.
The only way I could currently come up with was to bind to the filter callback on the table and use the aiDisplay array from the settings object so I can get the indexes of the filtered data.
Does anyone else know of a better solution?
Thanks for any suggestions.
This discussion has been closed.
Replies
If there's a "select all" button in the header, it only applies to visible Scroller rows. The ideal would be to apply it to all filtered rows of the table (and to the whole table if there is no search filter), not just the rows that have been rendered.
This is looking promising: [code]oTable.fnSettings().asDataSearch[/code]
I think we could be in business if we ammended asDataSearch to be an aaDataSearch ([[string,object],...]) or even create an aoDataSearch that resembles:
[code]
[ {'match':"what matched the search", 'object': $('tr of-searched-element') }
, { ... }
]
[/code]
Perhaps Allan has some ideas.
[code]aoData[ aiDisplay[rownum] ].nTr[/code] and if needed would replace the need for the amendment I was calling for above.