Implement clicking on grid and moving selected element