Apply $.fn.dataTableExt.afnFiltering to a DOM source datatable (on load from plugin)
Apply $.fn.dataTableExt.afnFiltering to a DOM source datatable (on load from plugin)
daniel_r
Posts: 460Questions: 4Answers: 67
Hi
I want to apply the range filter on a table that uses a DOM source, right now I achieve it by calling .fnDraw() on the table after $.fn.dataTableExt.afnFiltering.push call and it works fine, but I was wonder if there is a better more efficient way to do it.
For example in a sAjaxSource datatable I call the $.fn.dataTableExt.afnFiltering.push when table being initialized by the datatables constructor (before the draw event of the datatable is fired) so in the draw event the table being filtered thanks to the push I did to the $.fn.dataTableExt.afnFiltering.
So my question is: if I call my plugin in the following way: $(".my_table").datatables().myPLugin();, what would be the most efficient way to show the datatable filtered according to a range filter ($.fn.dataTableExt.afnFiltering.push)
b.t.w, I have values to push the the range filter because I'm reading those values from saved state (bStateSave --> oLoadedState) :)
Regards,
Daniel.
I want to apply the range filter on a table that uses a DOM source, right now I achieve it by calling .fnDraw() on the table after $.fn.dataTableExt.afnFiltering.push call and it works fine, but I was wonder if there is a better more efficient way to do it.
For example in a sAjaxSource datatable I call the $.fn.dataTableExt.afnFiltering.push when table being initialized by the datatables constructor (before the draw event of the datatable is fired) so in the draw event the table being filtered thanks to the push I did to the $.fn.dataTableExt.afnFiltering.
So my question is: if I call my plugin in the following way: $(".my_table").datatables().myPLugin();, what would be the most efficient way to show the datatable filtered according to a range filter ($.fn.dataTableExt.afnFiltering.push)
b.t.w, I have values to push the the range filter because I'm reading those values from saved state (bStateSave --> oLoadedState) :)
Regards,
Daniel.
This discussion has been closed.
Replies
You could possibly have your users to `myPlugin().dataTable()` to pre-set it up, but that might introduce further complications...
Allan