Before enabling filter, the filter configuration must be ready. Thus you need to read these information from server and then build the data that looks like this:
var filterConf = [{
field:'listprice',
type:'numberbox',
options:{precision:1},
op:['equal','notequal','less','greater']
},{
field:'unitcost',
type:'numberbox',
options:{precision:1},
op:['equal','notequal','less','greater']
}]
Finally call 'enableFilter' method with 'filterConf' parameter value.
$('#dg').datagrid('enableFilter', filterConf);