When the data is filtered, new rows will be loaded into the datagrid and the 'onLoadSuccess' event fires. You can retrieve the 'filterRules' property value to know what filtering rules are applied to the datagrid.
$('#dg').datagrid({
onLoadSuccess: function(data){
var opts = $(this).datagrid('options');
console.log(data);
console.log(opts.filterRules)
}
})