Initial code for pivot grid.