should datatable.onAfterFilter() work for a custom filter?

I have a custom filter

datatable.filter(function(obj){return obj[colId].toString().indexOf(text) != -1;});

When i try to use datatable.onAfterFilter() it wont pick up the activity. Am i doing something wrong?

datatable.onAfterFilter()

Do you mean the next code ?

datatable.attachEvent("onAfterFilter", function(){
 /*some*/
});

Yes sorry, the above is correct. For some reason it wont pick up on when my custom filter fires off.

But, if I add a filter to my table heads using the built in method, the event gets picked up.

Yep, you are right

There are two events

datatable.attachEvent("onAfterFilter", function(){
 /*some*/
});

and

datatable.data.attachEvent("onAfterFilter", function(){
 /*some*/
});

First is an event of datatable and occurs only for built-in filters. It occurs once for all filtering operations.

Second is an event of datastore and will occur for each filter, including the custom filter calls. So please try to use the second syntax.

Perfect maksim, thank you!