That is the way to retrieve rows in server side. The code below shows how to retrieve these rows in client side.
function getFilteredRows(dg){
var opts = dg.datagrid('options');
var src = dg.data('datagrid').filterSource;
var data = opts.filterMatcher.call(dg[0], src);
return data;
}