ColumnFilterWidgets with JSON-data
ColumnFilterWidgets with JSON-data
Hi,
I have managed to successfully migrate my 8.000-table row from HTML to JSON-data which has quite nicely boosted performance :-)
Now, one of the few remaining probs is when using ColumnFilterWidgets, it seems to use the plain json-data, not the data which my mRender-function returns. How can I feed "prepared" data into CFW?
Thanks
Michael
I have managed to successfully migrate my 8.000-table row from HTML to JSON-data which has quite nicely boosted performance :-)
Now, one of the few remaining probs is when using ColumnFilterWidgets, it seems to use the plain json-data, not the data which my mRender-function returns. How can I feed "prepared" data into CFW?
Thanks
Michael
This discussion has been closed.
Replies
I think you would need to modify the ColumnFilterWidgets code. I'm not particularly familiar with that plug-in, but I know it uses the fnGetColumnData plug-in API method - that gets the raw data for the column - as you say, unformatted.
Using DataTables 1.10 the `column().cache()` method ( http://next.datatables.net/reference/api/column().cache() ) could be used to get the data that DataTables is going to use for the column's filtering. So fnGetColumnData in ColumnFilterWidgets would basically be replaced with a call such as `table.column().cache( 'search' )` . This of course is dependent upon 1.10 - there isn't a method in 1.9 to get this stored information...
Long and short of it is, it would need an update to the plug-in.
Allan