$("#datagrid_id").datagrid({ ... loadFilter: function(data){ var grid_data = {}; grid_data.total = data.values.length; grid_data.rows = data.values; return grid_data; }});