Creating real-time update for width and height of grid