Prepare data for grid.